From: Bharat M. <bh...@us...> - 2005-05-01 21:37:47
|
Update of /cvsroot/gallery/gallery2/layouts/matrix/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19753/layouts/matrix/templates Modified Files: albumBody.tpl singleBody.tpl Log Message: Layout refactor! Main objectives: * Push matrix settings and logic for load album/item template data up into GalleryLayout so that the layout code is much simpler * Decouple all layouts (Siriux/Classic used to depend on Matrix, Slider used to depend on Hybrid). They are now all independent. Notes: * Bumped GalleryLayout API to 0.10 * Bumped all layouts up by 0.0.1 * Layouts now have loadAlbumTemplate() and loadItemTemplate() methods for easy overloading. * Refactored all layouts to use new loadAlbumTemplate() and loadItemTemplate() methods, and use the standard settings mechanism. Tile is the only one that does its own settings (good example of advanced settings) * highlightId and page>maxPages redirection now done in ShowItem; the layout can no longer redirect ShowItem elsewhere. This simplifies the layout API since none of the current APIs need to do redirection anymore. Index: singleBody.tpl =================================================================== RCS file: /cvsroot/gallery/gallery2/layouts/matrix/templates/singleBody.tpl,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- singleBody.tpl 27 Mar 2005 21:14:17 -0000 1.48 +++ singleBody.tpl 1 May 2005 21:36:54 -0000 1.49 @@ -79,7 +79,7 @@ <br/> {/if} - {if $layout.showImageOwner} + {if $layout.params.showImageOwner} {g->text text="Owner: %s" arg1=$layout.owner.fullName|default:$layout.owner.userName} <br/> {/if} @@ -98,7 +98,7 @@ </a> {/capture} - {if ($layout.can.viewInline[$layout.imageViewsIndex])} + {if ($layout.viewInline[$layout.imageViewsIndex])} {if isset($layout.photoFrame)} {g->block type="imageframe" frame=$layout.photoFrame} {g->image item=$layout.item image=$image id="%ID%" class="%CLASS%"} Index: albumBody.tpl =================================================================== RCS file: /cvsroot/gallery/gallery2/layouts/matrix/templates/albumBody.tpl,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- albumBody.tpl 6 Apr 2005 15:45:11 -0000 1.74 +++ albumBody.tpl 1 May 2005 21:36:54 -0000 1.75 @@ -40,7 +40,7 @@ </span> {/if} <br/> - {if $layout.showAlbumOwner} + {if $layout.params.showAlbumOwner} {g->text text="Owner: %s" arg1=$layout.owner.fullName|default:$layout.owner.userName} <br/> {/if} @@ -64,7 +64,7 @@ {foreach from=$layout.children item=child} {* Move to a new row *} - {if ($childrenInColumnCount == $layout.columnSize)} + {if ($childrenInColumnCount == $layout.params.columns)} </tr><tr valign="top"> {assign var="childrenInColumnCount" value=0} {/if} @@ -126,8 +126,8 @@ {g->text text="Date: %s" arg1=$smarty.capture.childTimestamp} <br/> - {if ($child.canContainChildren && $layout.showAlbumOwner) - || (!$child.canContainChildren && $layout.showImageOwner)} + {if ($child.canContainChildren && $layout.params.showAlbumOwner) + || (!$child.canContainChildren && $layout.params.showImageOwner)} {g->text text="Owner: %s" arg1=$layout.ownerMap[$child.ownerId].fullName|default:$layout.ownerMap[$child.ownerId].userName} <br/> {/if} @@ -158,7 +158,7 @@ {/foreach} {* flush the rest of the row with empty cells *} - {section name="flush" start=$childrenInColumnCount loop=$layout.columnSize} + {section name="flush" start=$childrenInColumnCount loop=$layout.params.columns} <td> </td> {/section} </tr></table> @@ -173,11 +173,11 @@ {include file="gallery:layouts/matrix/templates/itemNavigator.tpl"} - {if !empty($layout.jumprange)} + {if !empty($layout.jumpRange)} <div id="gsPages" class="gbBlock gcBackground1"> {g->text text="Page:"} {assign var="lastPage" value=0} - {foreach name=jumprange from=$layout.jumprange item=page} + {foreach name=jumpRange from=$layout.jumpRange item=page} {if ($page - $lastPage >= 2)} <span> {if ($page - $lastPage == 2)} |