# HG changeset patch # User Sverre Rabbelier # Date 1233418604 0 # Node ID 2b5c976e7edd8731402348a4148c7f6c394ab6c1 # Parent bd25a058ea2cbf055e30690596d58433817222eb Add an 'unread' style and add 'new document' link for user Patch by: Sverre Rabbelier diff -r bd25a058ea2c -r 2b5c976e7edd app/soc/content/css/soc-090120.css --- 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 { diff -r bd25a058ea2c -r 2b5c976e7edd app/soc/views/models/user_self.py --- 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 = '%s (%d)' % (force_unicode(link_title), count) + link_title = '%s (%d)' % (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