X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FSoneTemplatePage.java;h=5604c82adca9cff7ef363a3ce5fc81bcbc98b68c;hb=ad29f9185a90c07c95568f81b17b59b314761df8;hp=c1afadef7cd532c187c98cb4774d776b2a662b62;hpb=9e4db46b86d084eba9029906e779ec1d96f78ac4;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java index c1afade..5604c82 100644 --- a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java @@ -189,9 +189,11 @@ public class SoneTemplatePage extends TemplatePage { protected void processTemplate(Request request, TemplateContext templateContext) throws RedirectException { super.processTemplate(request, templateContext); templateContext.set("currentSone", getCurrentSone(request.getToadletContext(), false)); + templateContext.set("localSones", webInterface.getCore().getLocalSones()); templateContext.set("request", request); templateContext.set("currentVersion", SonePlugin.VERSION); templateContext.set("hasLatestVersion", webInterface.getCore().getUpdateChecker().hasLatestVersion()); + templateContext.set("latestEdition", webInterface.getCore().getUpdateChecker().getLatestEdition()); templateContext.set("latestVersion", webInterface.getCore().getUpdateChecker().getLatestVersion()); templateContext.set("latestVersionTime", webInterface.getCore().getUpdateChecker().getLatestVersionDate()); } @@ -202,7 +204,7 @@ public class SoneTemplatePage extends TemplatePage { @Override protected String getRedirectTarget(Page.Request request) { if (requiresLogin() && (getCurrentSone(request.getToadletContext(), false) == null)) { - return "login.html"; + return "login.html?target=" + request.getHttpRequest().getPath(); } return null; }