From bbed3c23f95b429664e38711dcd33caf06e23a55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 13 Apr 2011 06:00:05 +0200 Subject: [PATCH] Implement a lot more image and album processing on the image browser. --- src/main/resources/i18n/sone.en.properties | 25 +++- src/main/resources/templates/imageBrowser.html | 197 ++++++++++++++++++++----- 2 files changed, 187 insertions(+), 35 deletions(-) diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index aa90d0b..da15a37 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -162,6 +162,17 @@ Page.ImageBrowser.Album.Error.NotFound.Text=The requested album could not be fou Page.ImageBrowser.Sone.Title=Albums of {sone} Page.ImageBrowser.Sone.Error.NotFound.Text=The requested Sone could not be found. It is possible that it has not yet been downloaded. Page.ImageBrowser.CreateAlbum.Button.CreateAlbum=Create Album +Page.ImageBrowser.Album.Edit.Title=Edit Album +Page.ImageBrowser.Album.Label.Title=Title: +Page.ImageBrowser.Album.Label.Description=Description: +Page.ImageBrowser.Album.Button.Save=Save Album +Page.ImageBrowser.Album.Button.Delete=Delete Album +Page.ImageBrowser.Image.Edit.Title=Edit Image +Page.ImageBrowser.Image.Title.Label=Title: +Page.ImageBrowser.Image.Description.Label=Description: +Page.ImageBrowser.Image.Button.Save=Save Image +Page.ImageBrowser.Image.Delete.Title=Delete Image +Page.ImageBrowser.Image.Button.Delete=Delete Image Page.CreateAlbum.Title=Create Album - Sone Page.CreateAlbum.Page.Title=Create Album @@ -170,6 +181,11 @@ Page.CreateAlbum.Error.NameMissing=You seem to have forgotten to enter a name fo Page.UploadImage.Title=Upload Image - Sone Page.UploadImage.Error.InvalidImage=The image you were trying to upload could not be recognized. Please upload only JPEG (*.jpg or *.jpeg), or PNG (*.png) images. +Page.EditImage.Title=Edit Image +Page.DeleteImage.Title=Delete Image +Page.EditAlbum.Title=Edit Album +Page.DeleteAlbum.Title=Delete Album + Page.Trust.Title=Trust Sone - Sone Page.Distrust.Title=Distrust Sone - Sone @@ -257,8 +273,15 @@ WebInterface.DefaultText.BirthMonth=Month WebInterface.DefaultText.BirthYear=Year WebInterface.DefaultText.FieldName=Field name WebInterface.DefaultText.Option.InsertionDelay=Time to wait after a Sone is modified before insert (in seconds) -WebInterface.DefaultText.CreateAlbum.Name=Album name +WebInterface.DefaultText.Search=What are you looking for? +WebInterface.DefaultText.CreateAlbum.Name=Album title WebInterface.DefaultText.CreateAlbum.Description=Album description +WebInterface.DefaultText.EditAlbum.Title=Album title +WebInterface.DefaultText.EditAlbum.Description=Album description +WebInterface.DefaultText.UploadImage.Title=Image title +WebInterface.DefaultText.UploadImage.Description=Image description +WebInterface.DefaultText.EditImage.Title=Image title +WebInterface.DefaultText.EditImage.Description=Image description WebInterface.Confirmation.DeletePostButton=Yes, delete! WebInterface.Confirmation.DeleteReplyButton=Yes, delete! WebInterface.SelectBox.Choose=Choose… diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html index 80fe9c5..fd4c224 100644 --- a/src/main/resources/templates/imageBrowser.html +++ b/src/main/resources/templates/imageBrowser.html @@ -1,24 +1,5 @@ <%include include/head.html> - - <%if albumRequested> @@ -33,6 +14,46 @@ <%else> + <%if album.sone.local> + + <%/if> +

<%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html>

<%foreach album.albums album> -
+
<%ifnull album.image> <% album.title|html> @@ -71,26 +92,136 @@ <%if album.sone.current> <%include include/uploadImage.html> <%include include/createAlbum.html> + +

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

+ +
+ + + +
+ + +
+
+ + +
+ +
+ + <%if album.empty> +
+ + + +
+ <%/if> + <%/if> <%/if> <%elseif imageRequested> +

<%image.title|html>

+ +
+ <%ifnull image> <%else> -
- - <% image|image-link max-width=200 max-height=150> - + <%if image.sone.local> + + <%/if> + + +

<%image.description|parse sone=image.sone>

+ + <%if image.sone.local> + +

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

+ +
+ + + +
+ + +
+
+ + +
+
+ +
+
+ +

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

+ +
+ + + +
+ + <%/if> + <%/if> <%elseif soneRequested> + <%if sone.local> + + <%/if> + <%ifnull sone>

<%= Page.ImageBrowser.Sone.Error.NotFound.Text|l10n|html>

@@ -100,16 +231,14 @@

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

<%foreach sone.albums album> -