From: David ‘Bombe’ Roden Date: Fri, 14 Jan 2011 11:06:22 +0000 (+0100) Subject: Add template for “something strange has happened.” X-Git-Tag: 0.4^2~9^2~28 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=646004e2b898f06cef9e021f47e855b45b38ebc6;p=Sone.git Add template for “something strange has happened.” --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 2bf7381..52926a7 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -490,6 +490,7 @@ public class WebInterface implements CoreListener { Template logoutTemplate = templateFactory.createTemplate(createReader("/templates/logout.html")); Template optionsTemplate = templateFactory.createTemplate(createReader("/templates/options.html")); Template aboutTemplate = templateFactory.createTemplate(createReader("/templates/about.html")); + Template invalidTemplate = templateFactory.createTemplate(createReader("/templates/invalid.html")); Template postTemplate = templateFactory.createTemplate(createReader("/templates/include/viewPost.html")); Template replyTemplate = templateFactory.createTemplate(createReader("/templates/include/viewReply.html")); @@ -518,6 +519,7 @@ public class WebInterface implements CoreListener { pageToadlets.add(pageToadletFactory.createPageToadlet(new AboutPage(aboutTemplate, this, SonePlugin.VERSION), "About")); pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("noPermission.html", noPermissionTemplate, "Page.NoPermission.Title", this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new DismissNotificationPage(dismissNotificationTemplate, this))); + pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("invalid.html", invalidTemplate, "Page.Invalid.Title", this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new StaticPage("css/", "/static/css/", "text/css"))); pageToadlets.add(pageToadletFactory.createPageToadlet(new StaticPage("javascript/", "/static/javascript/", "text/javascript"))); pageToadlets.add(pageToadletFactory.createPageToadlet(new StaticPage("images/", "/static/images/", "image/png"))); diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 88877b8..b040036 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -149,6 +149,10 @@ Page.WotPluginMissing.Text.LoadPlugin=Please load the Web of Trust plugin in the Page.Logout.Title=Logout - Sone +Page.Invalid.Title=Invalid Action Performed +Page.Invalid.Page.Title=Invalid Action Performed +Page.Invalid.Text=An invalid action was performed, or the action was valid but the parameters were not. Please go back to the {link}index page{/link} and try again. If the error persists you have probably found a bug. + View.CreateSone.Text.WotIdentityRequired=To create a Sone you need an identity from the {link}Web of Trust plugin{/link}. View.CreateSone.Select.Default=Select an identity View.CreateSone.Text.NoIdentities=You do not have any Web of Trust identities. Please head over to the {link}Web of Trust plugin{/link} and create an identity. diff --git a/src/main/resources/templates/invalid.html b/src/main/resources/templates/invalid.html new file mode 100644 index 0000000..d838134 --- /dev/null +++ b/src/main/resources/templates/invalid.html @@ -0,0 +1,7 @@ +<%include include/head.html> + +

<%= Page.Invalid.Page.Title|l10n|html>

+ +

<%= Page.Invalid.Text|l10n|html|replace needle="{link}" replacement=''|replace needle="{/link}" replacement=''>

+ +<%include include/tail.html>