Add an 'unread' style and add 'new document' link for user
Patch by: Sverre Rabbelier
--- a/app/soc/content/css/soc-090120.css Sat Jan 31 16:15:53 2009 +0000
+++ b/app/soc/content/css/soc-090120.css Sat Jan 31 16:16:44 2009 +0000
@@ -322,6 +322,11 @@
margin-bottom: 1em;
}
+span.unread {
+ font-weight: bold;
+ color: #FF0000;
+}
+
/* SEARCH FIELD */
#search {
--- a/app/soc/views/models/user_self.py Sat Jan 31 16:15:53 2009 +0000
+++ b/app/soc/views/models/user_self.py Sat Jan 31 16:16:44 2009 +0000
@@ -40,6 +40,7 @@
from soc.views import helper
from soc.views.helper import access
from soc.views.helper import decorators
+from soc.views.helper import redirects
from soc.views.helper import widgets
from soc.views.models import base
from soc.views.models import user as user_view
@@ -209,10 +210,13 @@
count = len(list(notifications))
if count > 0:
- link_title = '<b>%s (%d)</b>' % (force_unicode(link_title), count)
+ link_title = '<span class="unread">%s (%d)</span>' % (force_unicode(link_title), count)
link_title = mark_safe(link_title)
items = [('/' + 'notification/list', link_title, 'notification')]
+ if user:
+ items += [(redirects.getCreateDocumentRedirect(user, 'user'),
+ "Create a New Document", 'any_access')]
new_params = {}
new_params['sidebar_additional'] = items