diff --git a/locales/de/LC_MESSAGES/loops.mo b/locales/de/LC_MESSAGES/loops.mo index 0a244f1..e8b16d3 100644 Binary files a/locales/de/LC_MESSAGES/loops.mo and b/locales/de/LC_MESSAGES/loops.mo differ diff --git a/locales/de/LC_MESSAGES/loops.po b/locales/de/LC_MESSAGES/loops.po index afe516f..7d440da 100644 --- a/locales/de/LC_MESSAGES/loops.po +++ b/locales/de/LC_MESSAGES/loops.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: 0.13.0\n" "POT-Creation-Date: 2007-05-22 12:00 CET\n" -"PO-Revision-Date: 2013-07-15 12:00 CET\n" +"PO-Revision-Date: 2015-10-30 12:00 CET\n" "Last-Translator: Helmut Merz \n" "Language-Team: loops developers \n" "MIME-Version: 1.0\n" @@ -483,6 +483,30 @@ msgstr "Lesezeichen für aktuelles Objekt hinzufügen" msgid "Remove from favorites" msgstr "Lesezeichen entfernen" +msgid "Notifications" +msgstr "Nachrichten" + +msgid "No new notifications" +msgstr "Keine neuen Nachrichten" + +msgid "${numNews} new notification" +msgstr "${numNews} neue Nachricht" + +msgid "${numNews} new notifications" +msgstr "${numNews} neue Nachrichten" + +msgid "Show all notifications" +msgstr "Alle Nachrichten anzeigen" + +msgid "Sender" +msgstr "Absender" + +msgid "Object" +msgstr "Objekt" + +msgid "Date/Time Read" +msgstr "Gelesen" + msgid "Personal Informations" msgstr "Persönliche Informationen" diff --git a/organize/personal/browser/configurator.py b/organize/personal/browser/configurator.py index 8ce2f9e..80f6089 100644 --- a/organize/personal/browser/configurator.py +++ b/organize/personal/browser/configurator.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2010 Helmut Merz helmutm@cy55.de +# Copyright (c) 2015 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,8 +18,6 @@ """ A view configurator provides configuration data for a view controller. - -$Id$ """ from zope import component @@ -30,6 +28,7 @@ from zope.traversing.browser.absoluteurl import absoluteURL from cybertools.browser.configurator import ViewConfigurator, MacroViewProperty from cybertools.meta.interfaces import IOptions +from loops.browser.node import NodeView from loops.organize.party import getPersonForUser from loops.util import _ @@ -44,10 +43,11 @@ class PortletConfigurator(ViewConfigurator): def __init__(self, context, request): self.context = context self.request = request + self.view = NodeView(self.context, self.request) @property def viewProperties(self): - return self.favorites + self.filters + return self.favorites + self.filters + self.notifications @Lazy def records(self): @@ -97,3 +97,25 @@ class PortletConfigurator(ViewConfigurator): #url=absoluteURL(self.context, self.request) + '/@@filters.html', )) return [filters] + + @property + def notifications(self): + if self.person is None: + return [] + notif = self.view.globalOptions.organize.showNotifications + if not notif: + return [] + if isinstance(notif, list): + notifPage = notif[0] + else: + notifPage = 'notifications' + portlet = MacroViewProperty(self.context, self.request) + portlet.setParams(dict( + slot='portlet_left', + identifier='loops.organize.notifications', + title=_(u'Notifications'), + subMacro=personal_macros.macros['notifications_portlet'], + priority=10, + url='%s/%s' % (self.view.menu.url, notifPage), + )) + return [portlet] diff --git a/organize/personal/browser/configure.zcml b/organize/personal/browser/configure.zcml index 5291df4..7eadee8 100644 --- a/organize/personal/browser/configure.zcml +++ b/organize/personal/browser/configure.zcml @@ -35,6 +35,12 @@ class="loops.organize.personal.browser.notification.NotificationsListing" permission="zope.View" /> + + +
No new notifications
+
+ + new notification
+
+ + new notifications
+ + +
@@ -65,7 +81,7 @@ Sender Object Message - Date/Time read + Date/Time Read