From 8a8b60858ae83812bf9c7e1898850f5dade69f82 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 12 Nov 2010 12:31:42 +0100 Subject: [PATCH] Add notifications for new posts and replies. --- src/main/resources/i18n/sone.en.properties | 2 ++ src/main/resources/static/css/sone.css | 15 +++++++++++++++ src/main/resources/templates/include/head.html | 25 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index bc149d8..2da12e4 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -197,5 +197,7 @@ WebInterface.SelectBox.Choose=Choose… WebInterface.SelectBox.Yes=Yes WebInterface.SelectBox.No=No WebInterface.ClickToShow.Replies=Click here to show hidden replies. +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! diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 5f3e938..fb7587f 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -53,6 +53,21 @@ textarea { margin-bottom: 1em; } +#sone #notification-area .notification { + padding: 1ex; + border: solid 1px #ccc; + background-color: #ffffa0; + margin-bottom: 1ex; +} + +#sone #notification-area .notification > div { + display: inline; +} + +#sone #notification-area .notification .post-count { + margin-left: 1ex; +} + #sone #plugin-warning { border: solid 0.5em red; padding: 0.5em; diff --git a/src/main/resources/templates/include/head.html b/src/main/resources/templates/include/head.html index 809bd57..deb020c 100644 --- a/src/main/resources/templates/include/head.html +++ b/src/main/resources/templates/include/head.html @@ -133,6 +133,31 @@ }); + +
<%if !webInterface.core.identityManager.connected> -- 2.7.4