From: Alan H. <min...@us...> - 2005-08-18 23:31:40
|
Update of /cvsroot/gallery/gallery2/themes/siriux/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15211/themes/siriux/templates Modified Files: photo.tpl Log Message: Add core.LoadPeers callback and make itemNavigator only load DataItems (so "next" doesn't jump into a subalbum). Details: - Remove 'peers' support from loadCommonTemplateData. - Add core.LoadPeers callback instead. - Update 'itemNavigator' in loadCommonTemplateData so it doesn't depend on 'peers' data anymore, and only loads child DataItems. - Rename 'peerThumbnails' key to 'navThumbnails'. - Make item/pageNavigator return first+previous, next+last even if they are equal; logic to omit duplicates now in tpl (for easier customization). - Update all themes and blocks for these changes. Index: photo.tpl =================================================================== RCS file: /cvsroot/gallery/gallery2/themes/siriux/templates/photo.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- photo.tpl 11 Aug 2005 14:29:27 -0000 1.3 +++ photo.tpl 17 Aug 2005 23:26:41 -0000 1.4 @@ -49,8 +49,9 @@ {if !empty($theme.navigator)} <div class="gbBlock gbNavigator"> + {g->callback type="core.LoadPeers" item=$theme.item windowSize=1} {g->block type="core.Navigator" navigator=$theme.navigator prefix="« " suffix=" »" - currentItem=$theme.peers[$theme.peerItemIndex].peerIndex totalItems=$theme.peerCount} + currentItem=$block.core.LoadPeers.thisPeerIndex totalItems=$block.core.LoadPeers.peerCount} </div> {/if} |