Paginate albums on gallery page.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 9 Jun 2012 10:27:39 +0000 (12:27 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 9 Jun 2012 10:27:39 +0000 (12:27 +0200)
src/main/resources/templates/imageBrowser.html

index c999be2..a88c48f 100644 (file)
 
        <%elseif galleryRequested>
 
-               <%foreach albums album>
+               <%foreach albums album|paginate pageSize=core.preferences.imagesPerPage pageParameter=request.page pagination=albumPagination>
                        <%first>
                                <h2><%= Page.ImageBrowser.Header.Albums|l10n|html></h2>
                                <%include include/pagination.html pagination=albumPagination pageParameter=="page">
                        <%/first>
-                       <%if loop.count|mod divisor=3><div class="album-row"><%/if>
+                       <%if loop.count|mod divisor==3><div class="album-row"><%/if>
                        <div id="album-<% album.id|html>" class="album">
                                <div class="album-id hidden"><% album.id|html></div>
                                <div class="album-container">
                        <%last><%= true|store key==endRow><%/last>
                        <%if endRow>
                                </div>
-                               <%include include/pagination.html pagination=albumPagination pageParameter=="page">
                        <%/if>
+                       <%last>
+                               <%include include/pagination.html pagination=albumPagination pageParameter=="page">
+                       <%/last>
                <%/foreach>
 
        <%/if>