Add title to pages.
[WoTNS.git] / src / main / java / net / pterodactylus / wotns / ui / web / BasicPage.java
index 082081c..ba2537e 100644 (file)
@@ -39,10 +39,13 @@ public class BasicPage extends FreenetTemplatePage {
 
        protected final IdentityManager identityManager;
 
-       public BasicPage(WebInterface webInterface, String path, Template template) {
+       private final String title;
+
+       public BasicPage(WebInterface webInterface, String path, String title, Template template) {
                super(path, webInterface.getTemplateContextFactory(), template, "noPermission.html");
                this.webInterface = webInterface;
                this.identityManager = webInterface.getWoTNSPlugin().getIdentityManager();
+               this.title = title;
        }
 
        //
@@ -68,6 +71,14 @@ public class BasicPage extends FreenetTemplatePage {
         * {@inheritDoc}
         */
        @Override
+       protected String getPageTitle(FreenetRequest request) {
+               return title;
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
        protected Collection<String> getStyleSheets() {
                return Arrays.asList("css/main.css");
        }