/** The version. */
public static final Version VERSION = new Version("rc1", 0, 9);
+ /** The current year at time of release. */
+ private static final int YEAR = 2015;
+
/** The logger. */
private static final Logger logger = getLogger("Sone.Plugin");
return l10n;
}
+ public static int getYear() {
+ return YEAR;
+ }
+
//
// FREDPLUGIN METHODS
//
*/
public class AboutPage extends SoneTemplatePage {
- /** The version to display. */
private final Version version;
+ private final int year;
- /**
- * 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) {
super("about.html", template, "Page.About.Title", webInterface, false);
this.version = version;
+ this.year = year;
}
- //
- // TEMPLATEPAGE METHODS
- //
-
- /**
- * {@inheritDoc}
- */
@Override
protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
super.processTemplate(request, templateContext);
templateContext.set("version", version);
+ templateContext.set("year", year);
}
}
pageToadlets.add(pageToadletFactory.createPageToadlet(new LogoutPage(emptyTemplate, this), "Logout"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new OptionsPage(optionsTemplate, this), "Options"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new RescuePage(rescueTemplate, this), "Rescue"));
- pageToadlets.add(pageToadletFactory.createPageToadlet(new AboutPage(aboutTemplate, this, SonePlugin.VERSION), "About"));
+ pageToadlets.add(pageToadletFactory.createPageToadlet(new AboutPage(aboutTemplate, this, SonePlugin.VERSION, SonePlugin.getYear()), "About"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("noPermission.html", noPermissionTemplate, "Page.NoPermission.Title", this)));
pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("emptyImageTitle.html", emptyImageTitleTemplate, "Page.EmptyImageTitle.Title", this)));
pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("emptyAlbumTitle.html", emptyAlbumTitleTemplate, "Page.EmptyAlbumTitle.Title", this)));
<h1><%= Page.About.Page.Title|l10n|html></h1>
- <p>Sone – The Freenet Social Network Plugin, Version <% version|html>, © 2010–2012 by David ‘Bombe’ Roden.</p>
+ <p>Sone – The Freenet Social Network Plugin, Version <% version|html>, © 2010–<% year|html> by David ‘Bombe’ Roden.</p>
<p>
<%= Page.About.Flattr.Description|l10n|html|replace needle=="{link}" replacement=='<a href="/?_CHECKED_HTTP_=https://www.flattr.com/" title="Flattr Homepage" target="_blank">'|replace needle=="{/link}" replacement=='</a>'>