Fix pagination on album pages.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 29 Aug 2012 09:36:05 +0000 (11:36 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 29 Aug 2012 09:36:05 +0000 (11:36 +0200)
src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java
src/main/resources/templates/imageBrowser.html

index a6d3daf..da48ec5 100644 (file)
@@ -65,6 +65,7 @@ public class ImageBrowserPage extends SoneTemplatePage {
                        Album album = webInterface.getCore().getAlbum(albumId, false);
                        templateContext.set("albumRequested", true);
                        templateContext.set("album", album);
                        Album album = webInterface.getCore().getAlbum(albumId, false);
                        templateContext.set("albumRequested", true);
                        templateContext.set("album", album);
+                       templateContext.set("page", request.getHttpRequest().getParam("page"));
                        return;
                }
                String imageId = request.getHttpRequest().getParam("image", null);
                        return;
                }
                String imageId = request.getHttpRequest().getParam("image", null);
index a88c48f..7752ffb 100644 (file)
                                </div>
                        <%/if>
 
                                </div>
                        <%/if>
 
-                       <%foreach album.images image|paginate pageSize=core.preferences.imagesPerPage page=request.page>
+                       <%foreach album.images image|paginate pageSize=core.preferences.imagesPerPage page=page>
                                <%first>
                                        <h2><%= Page.ImageBrowser.Header.Images|l10n|html></h2>
                                        <%include include/pagination.html pageParameter=="page">
                                <%first>
                                        <h2><%= Page.ImageBrowser.Header.Images|l10n|html></h2>
                                        <%include include/pagination.html pageParameter=="page">