From: David ‘Bombe’ Roden Date: Tue, 22 Mar 2011 19:44:59 +0000 (+0100) Subject: Use description when creating a new album. X-Git-Tag: beta-freefall-0.6.2-1~96 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=e9504bbabf697c07170ea61507742ba8cc702dd3 Use description when creating a new album. --- 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 @@ + +