Add “about” page.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 Oct 2010 20:27:41 +0000 (22:27 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 Oct 2010 20:27:41 +0000 (22:27 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java
src/main/resources/i18n/sone.en.properties
src/main/resources/templates/about.html [new file with mode: 0644]

index f9d6f64..f681ce7 100644 (file)
@@ -214,6 +214,7 @@ public class WebInterface extends AbstractService {
                Template deleteSoneTemplate = templateFactory.createTemplate(createReader("/templates/deleteSone.html"));
                Template noPermissionTemplate = templateFactory.createTemplate(createReader("/templates/noPermission.html"));
                Template logoutTemplate = templateFactory.createTemplate(createReader("/templates/logout.html"));
+               Template aboutTemplate = templateFactory.createTemplate(createReader("/templates/about.html"));
 
                PageToadletFactory pageToadletFactory = new PageToadletFactory(sonePlugin.pluginRespirator().getHLSimpleClient(), "/Sone/");
                pageToadlets.add(pageToadletFactory.createPageToadlet(new IndexPage(indexTemplate, this), "Index"));
@@ -238,6 +239,7 @@ public class WebInterface extends AbstractService {
                pageToadlets.add(pageToadletFactory.createPageToadlet(new DeleteSonePage(deleteSoneTemplate, this), "DeleteSone"));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new LoginPage(loginTemplate, this), "Login"));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new LogoutPage(logoutTemplate, this), "Logout"));
+               pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("about.html", aboutTemplate, "Page.About.Title", this), "About"));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("noPermission.html", noPermissionTemplate, "Page.NoPermission.Title", this)));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new StaticPage("css/", "/static/css/", "text/css")));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new StaticPage("javascript/", "/static/javascript/", "text/javascript")));
index 3235622..00ad9ff 100644 (file)
@@ -14,6 +14,11 @@ Navigation.Menu.Item.DeleteSone.Name=Delete Sone
 Navigation.Menu.Item.DeleteSone.Tooltip=Deletes the current Sone
 Navigation.Menu.Item.Logout.Name=Logout
 Navigation.Menu.Item.Logout.Tooltip=Logs you out of the current Sone
+Navigation.Menu.Item.About.Name=About
+Navigation.Menu.Item.About.Tooltip=Information about Sone
+
+Page.About.Title=About - Sone
+Page.About.Page.Title=About
 
 Page.Login.Title=Login - Sone
 Page.Login.Page.Title=Login
diff --git a/src/main/resources/templates/about.html b/src/main/resources/templates/about.html
new file mode 100644 (file)
index 0000000..c401b02
--- /dev/null
@@ -0,0 +1,27 @@
+<%include include/head.html>
+
+       <h1><%= Page.About.Page.Title|l10n|html></h1>
+
+       <p>Sone – The Freenet Social Network Plugin, © 2010 by David ‘Bombe’ Roden.</p>
+
+       <p>
+               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
+       the Free Software Foundation, either version 3 of the License, or
+       (at your option) any later version.
+    </p>
+
+    <p>
+       This program is distributed in the hope that it will be useful,
+           but WITHOUT ANY WARRANTY; without even the implied warranty of
+           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+           GNU General Public License for more details.
+    </p>
+
+    <p>
+           You should have received a copy of the GNU General Public License
+           along with this program.  If not, see
+           <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a>.
+    </p>
+
+<%include include/tail.html>