X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Ftemplates%2FimageBrowser.html;h=7752ffb969449d1525681abdfe7cf18aca142490;hb=d1a4ecd57e74c3fa8508200b215c6b76f83edf6f;hp=d97fc25048b917038c30a6e153703f8d6a240fe1;hpb=06259898e5fa6d06a3a7183e79985180b3112891;p=Sone.git
diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html
index d97fc25..7752ffb 100644
--- a/src/main/resources/templates/imageBrowser.html
+++ b/src/main/resources/templates/imageBrowser.html
@@ -118,9 +118,9 @@
ajaxGet("editImage.ajax", { "formPassword": getFormPassword(), "image": imageId, "title": title, "description": description }, function(data) {
if (data && data.success) {
getImage(data.imageId).find(".image-title").text(data.title);
- getImage(data.imageId).find(".image-description").text(data.description);
+ getImage(data.imageId).find(".image-description").html(data.parsedDescription);
getImage(data.imageId).find(":input[name='title']").attr("defaultValue", title);
- getImage(data.imageId).find(":input[name='description']").attr("defaultValue", description);
+ getImage(data.imageId).find(":input[name='description']").attr("defaultValue", data.description);
cancelImageEditing();
}
});
@@ -298,6 +298,9 @@
});
$("#edit-album label").hide();
+ /* hide non-js image move buttons. */
+ $(".move-buttons").hide();
+
hideAndShowBlock("div.edit-album", ".show-edit-album", ".hide-edit-album");
hideAndShowBlock("div.create-album", ".show-create-album", ".hide-create-album");
hideAndShowBlock("div.upload-image", ".show-upload-image", ".hide-upload-image");
@@ -309,9 +312,11 @@
<%/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>
@@ -340,7 +345,7 @@
@@ -368,17 +373,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>
+ <%include include/pagination.html pageParameter=="page">
+ <%/if>
<%/foreach>
<%if album.sone.local>
-
-
+
+
<%include include/uploadImage.html>
@@ -435,6 +451,8 @@
<%image.title|html>
+
+
>
<%foreach image.album.backlinks backlink backlinks>
<% backlink.name|html>
@@ -443,6 +461,8 @@
>
<%/if>
<%/foreach>
+ <%ifnull !image.previous>
<%/if>
+ <%ifnull !image.next>
<%/if>
<%ifnull image>
@@ -472,9 +492,9 @@
@@ -538,6 +558,9 @@
});
$("#create-album label").hide();
+ /* hide non-js move buttons. */
+ $(".move-buttons").hide();
+
hideAndShowBlock(".create-album", ".show-create-album", ".hide-create-album");
prepareAlbums();
@@ -551,7 +574,13 @@
<%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>
+
+
<%include include/browseAlbums.html albums=sone.albums>
@@ -565,6 +594,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>