X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FCreateSonePage.java;h=2c183df0c86927256b8ca04215fb5866943f0f00;hb=c4eb31ab64627adfdeed2a445d67883371203e99;hp=fc9f0d1a20928b83e52b4f169ce05789b326b1b6;hpb=c9e306ac8e3ada846e87a0cc256a20fc148f381c;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java index fc9f0d1..2c183df 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java @@ -1,5 +1,5 @@ /* - * Sone - CreateSonePage.java - Copyright © 2010 David Roden + * Sone - CreateSonePage.java - Copyright © 2010–2013 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -91,12 +91,12 @@ public class CreateSonePage extends SoneTemplatePage { // TEMPLATEPAGE METHODS // - /** - * {@inheritDoc} - */ @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) { @@ -125,9 +125,6 @@ public class CreateSonePage extends SoneTemplatePage { } } - /** - * {@inheritDoc} - */ @Override public boolean isEnabled(ToadletContext toadletContext) { if (webInterface.getCore().getPreferences().isRequireFullAccess() && !toadletContext.isAllowedFullAccess()) {