From 853782fb35ffd26038a8f442d4d150ccef648583 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sat, 17 Oct 2015 12:17:56 +0200 Subject: [PATCH] work in progress: notifications listing --- organize/personal/README.txt | 6 +++ organize/personal/browser/configure.zcml | 6 +++ organize/personal/browser/notification.py | 44 ++++++++++++++++++++ organize/personal/browser/personal_macros.pt | 16 +++++++ 4 files changed, 72 insertions(+) create mode 100644 organize/personal/browser/notification.py diff --git a/organize/personal/README.txt b/organize/personal/README.txt index 48c453a..ca8ff4d 100644 --- a/organize/personal/README.txt +++ b/organize/personal/README.txt @@ -149,6 +149,12 @@ It's possible to store more than one notification concerning the same object. >>> len(list(notifications.listTracks())) 2 +User interface +-------------- + + >>> from loops.organize.personal.browser.notification import NotificationsListing + >>> view = NotificationsListing(home, TestRequest()) + Filters - Show only Certain Parts of the Concept Map ==================================================== diff --git a/organize/personal/browser/configure.zcml b/organize/personal/browser/configure.zcml index e91aa60..5d7ff50 100644 --- a/organize/personal/browser/configure.zcml +++ b/organize/personal/browser/configure.zcml @@ -29,4 +29,10 @@ + + diff --git a/organize/personal/browser/notification.py b/organize/personal/browser/notification.py new file mode 100644 index 0000000..cbc7674 --- /dev/null +++ b/organize/personal/browser/notification.py @@ -0,0 +1,44 @@ +# +# 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +""" +Notifications listing. +""" + +from zope import component +from zope.app.pagetemplate import ViewPageTemplateFile +from zope.cachedescriptors.property import Lazy + +from loops.browser.concept import ConceptView +from loops.organize.party import getPersonForUser +from loops import util + + +personal_macros = ViewPageTemplateFile('personal_macros.pt') + + +class NotificationsListing(ConceptView): + + @Lazy + def macro(self): + return personal_macros.macros['notifications'] + + @Lazy + def person(self): + return getPersonForUser(self.context, self.request) + diff --git a/organize/personal/browser/personal_macros.pt b/organize/personal/browser/personal_macros.pt index d9471e0..77e7a1f 100644 --- a/organize/personal/browser/personal_macros.pt +++ b/organize/personal/browser/personal_macros.pt @@ -45,3 +45,19 @@ i18n:attributes="title">Add Filter + + + +
+ + + + + + + + + +
Date/TimeSenderObjectTextDate/Time read
+
+