X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Ftemplates%2FimageBrowser.html;h=a8a33c9e3a57b0df84b5d58d5b0f6ed9cb49923a;hb=713bac294fb41c5fbc3d9730d7648d3ec90ee697;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..a8a33c9 100644
--- a/src/main/resources/templates/imageBrowser.html
+++ b/src/main/resources/templates/imageBrowser.html
@@ -2,26 +2,264 @@
image-browser
-
<%if albumRequested>
@@ -37,7 +275,8 @@
<%else>
<%if album.sone.local>
-
<%/if>
- <%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html>
+ <%= Page.ImageBrowser.Album.Title|l10n|replace needle=='{album}' replacement=album.title|html>
+
+
>
<%foreach album.backlinks backlink backlinks>
-
<% album.description|html>
+
<% album.description|parse sone=album.sone|render>
<%if album.sone.local>
@@ -136,29 +366,7 @@
<%/if>
- <%foreach album.albums album>
- <%first><%= Page.ImageBrowser.Header.Albums|l10n|html>
<%/first>
- <%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=album.albums>
<%if album.sone.local>
@@ -168,17 +376,20 @@
<%/if>
- <%foreach album.images image>
- <%first><%= Page.ImageBrowser.Header.Images|l10n|html>
<%/first>
- <%if loop.count|mod divisor=3><%/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>
-
-
+
+
<%include include/uploadImage.html>
@@ -233,6 +454,8 @@
<%image.title|html>
+
+
>
<%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>
@@ -248,7 +473,7 @@
<%else>
<%if image.sone.local>
-
<%/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>