X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FAboutPage.java;h=b69ac28c2505335a8420e861854b7150a573c323;hb=00d6cb2688d8dda20ce55d71825b4446701a3a7a;hp=c20c72e1f891bdd09f562571e7555a77a18b5f1c;hpb=4c831fb948000bc1730ebcde73eeb62317f4ac54;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/AboutPage.java b/src/main/java/net/pterodactylus/sone/web/AboutPage.java index c20c72e..b69ac28 100644 --- a/src/main/java/net/pterodactylus/sone/web/AboutPage.java +++ b/src/main/java/net/pterodactylus/sone/web/AboutPage.java @@ -1,5 +1,5 @@ /* - * Sone - AboutPage.java - Copyright © 2010 David Roden + * Sone - AboutPage.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 @@ -17,7 +17,9 @@ package net.pterodactylus.sone.web; +import net.pterodactylus.sone.web.page.FreenetRequest; import net.pterodactylus.util.template.Template; +import net.pterodactylus.util.template.TemplateContext; import net.pterodactylus.util.version.Version; /** @@ -27,35 +29,22 @@ import net.pterodactylus.util.version.Version; */ public class AboutPage extends SoneTemplatePage { - /** The version to display. */ private final Version version; + private final int year; + private final String homepage; - /** - * Creates a new “about” page. - * - * @param template - * The template to render - * @param webInterface - * The Sone web interface - * @param version - * The version to display - */ - public AboutPage(Template template, WebInterface webInterface, Version version) { + public AboutPage(Template template, WebInterface webInterface, Version version, int year, String homepage) { super("about.html", template, "Page.About.Title", webInterface, false); this.version = version; + this.year = year; + this.homepage = homepage; } - // - // TEMPLATEPAGE METHODS - // - - /** - * {@inheritDoc} - */ @Override - protected void processTemplate(Request request, Template template) throws RedirectException { - super.processTemplate(request, template); - template.set("version", version); + protected void processSonePage(FreenetRequest request, TemplateContext templateContext) throws RedirectException { + templateContext.set("version", version); + templateContext.set("year", year); + templateContext.set("homepage", homepage); } }