From cafc349bdbf3fd254b15dea83d6172b0784ebe30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 14 Nov 2010 15:39:58 +0100 Subject: [PATCH] Render notifications. --- src/main/resources/i18n/sone.en.properties | 5 +++++ src/main/resources/static/css/sone.css | 4 ++++ src/main/resources/templates/dismissNotification.html | 3 +++ src/main/resources/templates/include/head.html | 16 +++++++++++++++- .../resources/templates/notify/startupNotification.html | 1 + 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/templates/dismissNotification.html create mode 100644 src/main/resources/templates/notify/startupNotification.html diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 2da12e4..2c2f514 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -142,6 +142,8 @@ Page.NoPermission.Title=Unauthorized Access - Sone Page.NoPermission.Page.Title=Unauthorized Access Page.NoPermission.Text.NoPermission=You tried to do something that you do not have sufficient authorization for. Please refrain from such actions in the future or we will be forced to take counter-measures! +Page.DismissNotification.Title=Dismiss Notification - Sone + Page.WotPluginMissing.Title=Web of Trust Plugin Missing - Sone Page.WotPluginMissing.Page.Title=Web of Trust Plugin Missing Page.WotPluginMissing.Text.WotRequired=Because the Web of Trust is an integral part of Sone, the Web of Trust plugin has to be loaded in order to run Sone. @@ -201,3 +203,6 @@ WebInterface.Notification.NewPostCount=You have new posts: WebInterface.Notification.NewReplyCount=You have new replies: Warning.PluginNotConnected.Text=The Web of Trust plugin could not be found! This can happen if the Web of Trust plugin is not loaded or if your node is currently still starting up. In the first case, load the Web of Trust plugin using the {link}plugin manager{/link}, in the second case wait until the Web of Trust plugin has been loaded, because in either case Sone will not be working unless the Web of Trust plugin is loaded! + +Notification.Startup.Text=Sone is currently starting up. It may take a while to retrieve all identities and Sones from the web of trust. If you are missing some elements, please be patient, they will probably reappear very soon. +Notification.Button.Dismiss=Dismiss diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index c6b65ff..75a0bfd 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -60,6 +60,10 @@ textarea { margin-bottom: 1ex; } +#sone #notification-area .notification .dismiss { + float: right; +} + #sone #notification-area .notification > div { display: inline; } diff --git a/src/main/resources/templates/dismissNotification.html b/src/main/resources/templates/dismissNotification.html new file mode 100644 index 0000000..196af72 --- /dev/null +++ b/src/main/resources/templates/dismissNotification.html @@ -0,0 +1,3 @@ +<%include include/head.html> + +<%include include/tail.html> diff --git a/src/main/resources/templates/include/head.html b/src/main/resources/templates/include/head.html index 858851a..2a2d3b6 100644 --- a/src/main/resources/templates/include/head.html +++ b/src/main/resources/templates/include/head.html @@ -204,7 +204,21 @@ <%/if> -
+
+ <%foreach webInterface.core.notifications.all notification> +
+ <%if notification.dismissable> +
+ + + + +
+ <%/if> + <% notification.render> +
+ <%/foreach> +
diff --git a/src/main/resources/templates/notify/startupNotification.html b/src/main/resources/templates/notify/startupNotification.html new file mode 100644 index 0000000..8210f8f --- /dev/null +++ b/src/main/resources/templates/notify/startupNotification.html @@ -0,0 +1 @@ +
<%= Notification.Startup.Text|l10n|html>
-- 2.7.4