From 2a42179827de132c990409999d7d7dd013d69d03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 29 Aug 2012 11:36:05 +0200 Subject: [PATCH] Fix pagination on album pages. --- src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java | 1 + src/main/resources/templates/imageBrowser.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java b/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java index a6d3daf..da48ec5 100644 --- a/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java @@ -65,6 +65,7 @@ public class ImageBrowserPage extends SoneTemplatePage { 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); diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html index a88c48f..7752ffb 100644 --- a/src/main/resources/templates/imageBrowser.html +++ b/src/main/resources/templates/imageBrowser.html @@ -373,7 +373,7 @@ <%/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>

<%= Page.ImageBrowser.Header.Images|l10n|html>

<%include include/pagination.html pageParameter=="page"> -- 2.7.4