X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fresources%2Ftemplates%2FimageBrowser.html;h=7dd4c29361051110f3f88aab7f9f9cc6e2164ffe;hb=fcd3a59e73209164daed5947cd58ff0918b947b8;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..7dd4c29 100644
--- a/src/main/resources/templates/imageBrowser.html
+++ b/src/main/resources/templates/imageBrowser.html
@@ -3,25 +3,263 @@
image-browser
<%if albumRequested>
@@ -38,6 +276,7 @@
<%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>
<%if album.sone.local>
@@ -123,6 +353,17 @@
+ <%if ! album.images.empty>
+
+
+
+
+ <%/if>
@@ -136,29 +377,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 +387,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=core.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>
<%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 +465,8 @@
<%image.title|html>
+
+
>
<%foreach image.album.backlinks backlink backlinks>
<% backlink.name|html>
@@ -241,6 +475,8 @@
>
<%/if>
<%/foreach>
+ <%ifnull !image.previous>
<%/if>
+ <%ifnull !image.next>
<%/if>
<%ifnull image>
@@ -270,9 +506,9 @@
@@ -336,7 +572,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 +588,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 +608,42 @@
<%/if>
+ <%elseif galleryRequested>
+
+ <%foreach albums album|paginate pageSize=core.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>
+
+
+ <%= 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>