X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Ftemplates%2FimageBrowser.html;h=5a26c1a2741fdd8360a0b46997185770c45311bc;hb=f71a4ea27ef8a7ef12466a81d62b5ca60fc69854;hp=9f1aeabcc7adeac1bd38d0053b456785d7bce5c4;hpb=b0ccdb1cefd9b40fc487c55e9b0bcfb72ca75a7c;p=Sone.git diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html index 9f1aeab..5a26c1a 100644 --- a/src/main/resources/templates/imageBrowser.html +++ b/src/main/resources/templates/imageBrowser.html @@ -50,6 +50,20 @@ }); }); $("#edit-album label").hide(); + + /* hide all those forms. */ + hideBlock = function(blockElement, clickElement) { + $(blockElement).hide(); + $(clickElement).removeClass("hidden").click(function() { + $(blockElement).slideDown(); + $(this).slideUp(); + return false; + }); + }; + + hideBlock(".edit-album", ".show-edit-album"); + hideBlock(".create-album", ".show-create-album"); + hideBlock(".upload-image", ".show-upload-image"); }); <%/if> @@ -69,7 +83,31 @@

<% album.description|html>

+ <%if album.sone.local> +

+
+

<%= Page.ImageBrowser.Album.Edit.Title|l10n|html>

+ +
+ + + +
+ + +
+
+ + +
+ +
+
+ <%/if> + <%foreach album.albums album> + <%first>

<%= Page.ImageBrowser.Header.Albums|l10n|html>

<%/first> + <%if loop.count|mod divisor=3>
<%/if>
<%ifnull album.albumImage> @@ -81,35 +119,36 @@ <% album.title|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> + <%if album.sone.local> +

+
+ <%include include/createAlbum.html> +
+ <%/if> + <%foreach album.images image> + <%first>

<%= Page.ImageBrowser.Header.Images|l10n|html>

<%/first> + <%if loop.count|mod divisor=3>
<%/if>
<% image|image-link max-width=200 max-height=150>
+ <%= 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> - <%if album.sone.local> - <%include include/uploadImage.html> - <%include include/createAlbum.html> - -

<%= Page.ImageBrowser.Album.Edit.Title|l10n|html>

- -
- - - -
- - -
-
- - -
- -
+

+
+ <%include include/uploadImage.html> +
<%if album.empty>
@@ -155,6 +194,19 @@ }); }); $("#edit-image label").hide(); + + /* hide all those forms. */ + hideBlock = function(blockElement, clickElement) { + $(blockElement).hide(); + $(clickElement).removeClass("hidden").click(function() { + $(blockElement).slideDown(); + $(this).slideUp(); + return false; + }); + }; + + hideBlock(".edit-image", ".show-edit-image"); + hideBlock(".delete-image", ".show-delete-image"); }); <%/if> @@ -171,31 +223,38 @@ <%if image.sone.local> -

<%= Page.ImageBrowser.Image.Edit.Title|l10n|html>

- - - - - -
- - -
-
- - -
-
- -
-
+

+
+

<%= Page.ImageBrowser.Image.Edit.Title|l10n|html>

+ +
+ + + + +
+ + +
+
+ + +
+
+ +
+
+
-

<%= Page.ImageBrowser.Image.Delete.Title|l10n|html>

+

+
+

<%= Page.ImageBrowser.Image.Delete.Title|l10n|html>

-
- - -
+
+ + +
+
<%/if> @@ -217,6 +276,18 @@ }); }); $("#create-album label").hide(); + + /* hide all those forms. */ + hideBlock = function(blockElement, clickElement) { + $(blockElement).hide(); + $(clickElement).removeClass("hidden").click(function() { + $(blockElement).slideDown(); + $(this).slideUp(); + return false; + }); + }; + + hideBlock(".create-album", ".show-create-album"); }); <%/if> @@ -230,6 +301,7 @@

<%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html>

<%foreach sone.albums album> + <%if loop.count|mod divisor=3>
<%/if>
<%ifnull album.albumImage> @@ -241,10 +313,17 @@ <% album.title|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> <%if sone.local> - <%include include/createAlbum.html> +

+
+ <%include include/createAlbum.html> +
<%/if> <%/if>