Add “help” page.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 28 Oct 2010 04:13:59 +0000 (06:13 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 28 Oct 2010 04:13:59 +0000 (06:13 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java
src/main/resources/i18n/sone.en.properties
src/main/resources/static/css/sone.css
src/main/resources/templates/help.html [new file with mode: 0644]

index c27b530..fd4365e 100644 (file)
@@ -222,6 +222,7 @@ public class WebInterface extends AbstractService {
                Template blacklistSoneTemplate = templateFactory.createTemplate(createReader("/templates/blacklistSone.html"));
                Template unblacklistSoneTemplate = templateFactory.createTemplate(createReader("/templates/unblacklistSone.html"));
                Template aboutTemplate = templateFactory.createTemplate(createReader("/templates/about.html"));
+               Template helpTemplate = templateFactory.createTemplate(createReader("/templates/help.html"));
 
                PageToadletFactory pageToadletFactory = new PageToadletFactory(sonePlugin.pluginRespirator().getHLSimpleClient(), "/Sone/");
                pageToadlets.add(pageToadletFactory.createPageToadlet(new IndexPage(indexTemplate, this), "Index"));
@@ -252,6 +253,7 @@ public class WebInterface extends AbstractService {
                pageToadlets.add(pageToadletFactory.createPageToadlet(new BlacklistSonePage(blacklistSoneTemplate, this)));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new UnblacklistSonePage(unblacklistSoneTemplate, this)));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new AboutPage(aboutTemplate, this, SonePlugin.VERSION), "About"));
+               pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("help.html", helpTemplate, "Page.Help.Title", this), "Help"));
                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 da7c8db..914d9a8 100644 (file)
@@ -22,6 +22,16 @@ Navigation.Menu.Item.Blacklist.Name=Blacklist
 Navigation.Menu.Item.Blacklist.Tooltip=Manages the global blacklist
 Navigation.Menu.Item.About.Name=About
 Navigation.Menu.Item.About.Tooltip=Information about Sone
+Navigation.Menu.Item.Help.Name=Help
+Navigation.Menu.Item.Help.Tooltip=The Sone User Manual
+
+Page.Help.Title=Help - Sone
+Page.Help.Page.Title=The Sone User Manual
+Page.Help.Text.Introduction=Though Sone aims to be very easy to use there probably are a couple of functions that need to be explained.
+Page.Help.Topic.Blocking.Title=What is “blocking?”
+Page.Help.Topic.Blocking.Text=“Blocking a Sone” means to exclude it from the current Sone distribution method. Every time your Sone is updated, a list of all Sones you know is distributed as well—unless you block or blacklist a Sone.
+Page.Help.Topic.Blacklisting.Title=What is the difference between “blocking” and “blacklisting?”
+Page.Help.Topic.Blacklisting.Text=Blocking a Sone is only possible when you are logged in to a Sone so you can choose to not distribute somebody else’s Sone per Sone. Blacklisting works globally—a blacklisted Sone will not be distributed by any Sone on your node, starting with the next update of each Sone.
 
 Page.About.Title=About - Sone
 Page.About.Page.Title=About
index 9b74217..0feb601 100644 (file)
@@ -411,6 +411,13 @@ textarea {
        clear: both;
 }
 
+#sone h2 {
+       font-family: inherit;
+       font-size: 150%;
+       font-weight: bold;
+       clear: both;
+}
+
 #sone .error label {
        color: red;
        font-weight: bold;
diff --git a/src/main/resources/templates/help.html b/src/main/resources/templates/help.html
new file mode 100644 (file)
index 0000000..f4a2f20
--- /dev/null
@@ -0,0 +1,15 @@
+<%include include/head.html>
+
+       <h1><%= Page.Help.Page.Title|l10n|html></h1>
+
+       <p><%= Page.Help.Text.Introduction|l10n|html></p>
+
+       <h2><%= Page.Help.Topic.Blocking.Title|l10n|html></h2>
+
+       <p><%= Page.Help.Topic.Blocking.Text|l10n|html></p>
+
+       <h2><%= Page.Help.Topic.Blacklisting.Title|l10n|html></h2>
+
+       <p><%= Page.Help.Topic.Blacklisting.Text|l10n|html></p>
+
+<%include include/tail.html>