From e9504bbabf697c07170ea61507742ba8cc702dd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 22 Mar 2011 20:44:59 +0100 Subject: [PATCH] Use description when creating a new album. --- src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.java | 3 ++- src/main/resources/i18n/sone.en.properties | 1 + src/main/resources/templates/include/createAlbum.html | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.java b/src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.java index 7b51fb5..378f815 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.java @@ -58,11 +58,12 @@ public class CreateAlbumPage extends SoneTemplatePage { templateContext.set("nameMissing", true); return; } + String description = request.getHttpRequest().getPartAsStringFailsafe("description", 256).trim(); Sone currentSone = getCurrentSone(request.getToadletContext()); String parentId = request.getHttpRequest().getPartAsStringFailsafe("parent", 36); Album parent = webInterface.getCore().getAlbum(parentId, false); Album album = webInterface.getCore().createAlbum(currentSone, parent); - album.setName(name); + album.setName(name).setDescription(description); throw new RedirectException("imageBrowser.html?album=" + album.getId()); } } diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 3f64f51..f8e775b 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -234,6 +234,7 @@ View.Trust.Tooltip.Untrust=Remove your trust assignment for this person View.CreateAlbum.Title=Create Album View.CreateAlbum.Label.Name=Name: +View.CreateAlbum.Label.Description=Description: WebInterface.DefaultText.StatusUpdate=What’s on your mind? WebInterface.DefaultText.Message=Write a Message… diff --git a/src/main/resources/templates/include/createAlbum.html b/src/main/resources/templates/include/createAlbum.html index 6e3623f..4887199 100644 --- a/src/main/resources/templates/include/createAlbum.html +++ b/src/main/resources/templates/include/createAlbum.html @@ -5,5 +5,7 @@ + + -- 2.7.4