From: David ‘Bombe’ Roden Date: Fri, 5 Jul 2013 22:33:48 +0000 (+0200) Subject: Store Sones in “create Sone” page, for when there are no identities without Sone... X-Git-Tag: 0.8.7^2~45 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=775e095353d6734c1cc245339bed3eb530348e2e;p=Sone.git Store Sones in “create Sone” page, for when there are no identities without Sone left. This fixes #289. --- 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) {