X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FAboutPage.java;h=87d98169159cce0dd561e8231cae5599bfeae09a;hp=4c14457c0b6a2beebf29362ad8d63ff5aefb28df;hb=7b55e0be6a3283e43a9bbab98f82aebdd948eb33;hpb=ecf753a31601e558b681daab0598009fe9eec99a diff --git a/src/main/java/net/pterodactylus/sone/web/AboutPage.java b/src/main/java/net/pterodactylus/sone/web/AboutPage.java index 4c14457..87d9816 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–2016 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,6 +17,7 @@ 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; @@ -28,35 +29,22 @@ import net.pterodactylus.util.version.Version; */ public class AboutPage extends SoneTemplatePage { - /** The version to display. */ - private final Version version; + private final String 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, String 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, TemplateContext templateContext) throws RedirectException { - super.processTemplate(request, templateContext); + protected void handleRequest(FreenetRequest request, TemplateContext templateContext) throws RedirectException { templateContext.set("version", version); + templateContext.set("year", year); + templateContext.set("homepage", homepage); } }