From 775e095353d6734c1cc245339bed3eb530348e2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 6 Jul 2013 00:33:48 +0200 Subject: [PATCH] =?utf8?q?Store=20Sones=20in=20=E2=80=9Ccreate=20Sone?= =?utf8?q?=E2=80=9D=20page,=20for=20when=20there=20are=20no=20identities?= =?utf8?q?=20without=20Sone=20left.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes #289. --- src/main/java/net/pterodactylus/sone/web/CreateSonePage.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java index aea76c4..fe8c32e 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java @@ -97,6 +97,9 @@ public class CreateSonePage extends SoneTemplatePage { @Override protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException { super.processTemplate(request, templateContext); + List localSones = new ArrayList(webInterface.getCore().getLocalSones()); + Collections.sort(localSones, Sone.NICE_NAME_COMPARATOR); + templateContext.set("sones", localSones); List ownIdentitiesWithoutSone = getOwnIdentitiesWithoutSone(webInterface.getCore()); templateContext.set("identitiesWithoutSone", ownIdentitiesWithoutSone); if (request.getMethod() == Method.POST) { -- 2.7.4