From: David ‘Bombe’ Roden Date: Wed, 29 Aug 2012 09:36:05 +0000 (+0200) Subject: Fix pagination on album pages. X-Git-Tag: 0.8.3^2~57 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2a42179827de132c990409999d7d7dd013d69d03;p=Sone.git Fix pagination on album pages. --- 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">