X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Ftemplates%2FimageBrowser.html;h=b8b9cb204eb3b07a74b438ab205ccd2273f1d0bd;hb=5dc729a6e73c1000f22e9fb5dbb75d856c16eb04;hp=ba8220d56d4f60da93bb12f49ac2363de4b2841a;hpb=e3ae4a824c152c12ce220f1269b75dd308707f2b;p=Sone.git
diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html
index ba8220d..b8b9cb2 100644
--- a/src/main/resources/templates/imageBrowser.html
+++ b/src/main/resources/templates/imageBrowser.html
@@ -3,25 +3,263 @@
<%/if>
+ <%foreach album.images image|paginate pageSize=preferences.imagesPerPage page=page>
+ <%first>
+
<%= Page.ImageBrowser.Header.Images|l10n|html>
+ <%include include/pagination.html pageParameter=="page">
+ <%/first>
+ <%if loop.count|mod divisor==3>
<%/if>
<% image.id|html>
<% image.title|html>
-
<% image.description|html>
+
<% image.description|parse sone=image.sone|render>
<%if album.sone.local>
<%/if>
- <%= false|store key=endRow>
- <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
- <%last><%= true|store key=endRow><%/last>
- <%if endRow>
<%/if>
+ <%= false|store key==endRow>
+ <%if loop.count|mod divisor==3 offset==1><%= true|store key==endRow><%/if>
+ <%last><%= true|store key==endRow><%/last>
+ <%if endRow>
+
+ <%/if>
+ <%last><%include include/pagination.html pageParameter=="page"><%/last>
<%/foreach>
<%if album.sone.local>
-
+
+
>
<%foreach image.album.backlinks backlink backlinks>
<% backlink.name|html>
@@ -241,6 +464,8 @@
>
<%/if>
<%/foreach>
+ <%ifnull !image.previous>
<%/if>
+ <%ifnull !image.next>
<%/if>
<%ifnull image>
@@ -270,13 +495,13 @@
-
<%image.description|parse sone=image.sone>
+
<%image.description|parse sone=image.sone|render>
<%if image.sone.local>
@@ -336,7 +561,12 @@
});
$("#create-album label").hide();
+ /* hide non-js move buttons. */
+ $(".move-buttons").hide();
+
hideAndShowBlock(".create-album", ".show-create-album", ".hide-create-album");
+
+ prepareAlbums();
});
<%/if>
@@ -347,30 +577,15 @@
<%else>
-
<%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html>
+
<%= Page.ImageBrowser.Sone.Title|l10n|replace needle=='{sone}' replacement=sone.niceName|html>
- <%foreach sone.albums album>
- <%if loop.count|mod divisor=3>
<%/if>
-
-
-
-
<% album.title|html>
-
<% album.description|html>
-
-
- <%= false|store key=endRow>
- <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
- <%last><%= true|store key=endRow><%/last>
- <%if endRow>
<%/if>
- <%/foreach>
+
+
+ <%include include/browseAlbums.html albums=sone.rootAlbum.albums>
<%if sone.local>
@@ -382,6 +597,42 @@
<%/if>
+ <%elseif galleryRequested>
+
+ <%foreach albums album|paginate pageSize=preferences.imagesPerPage pageParameter=request.page pagination=albumPagination>
+ <%first>
+
<%= Page.ImageBrowser.Header.Albums|l10n|html>
+ <%include include/pagination.html pagination=albumPagination pageParameter=="page">
+ <%/first>
+ <%if loop.count|mod divisor==3>
<%/if>
+
+
<% album.id|html>
+
+
+
+
<% album.title|html> (<%= View.Sone.Stats.Images|l10n 0=album.images.size>)
+
<% album.description|parse sone=album.sone|render>
+
+
+ <%= false|store key==endRow>
+ <%if loop.count|mod divisor==3 offset==1><%= true|store key==endRow><%/if>
+ <%last><%= true|store key==endRow><%/last>
+ <%if endRow>
+
+ <%/if>
+ <%last>
+ <%include include/pagination.html pagination=albumPagination pageParameter=="page">
+ <%/last>
+ <%/foreach>
+
<%/if>
<%include include/tail.html>