[Mpuls-commits] r2363 - wasko/branches/2.0/jmdweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Apr 15 10:29:32 CEST 2010


Author: torsten
Date: 2010-04-15 10:29:32 +0200 (Thu, 15 Apr 2010)
New Revision: 2363

Added:
   wasko/branches/2.0/jmdweb/controllers/jmd.py
Log:
* jmdweb/controllers/jmd.py (JmdController.get_reminders): New. JMD
specific function of geting automatic reminders.


Added: wasko/branches/2.0/jmdweb/controllers/jmd.py
===================================================================
--- wasko/branches/2.0/jmdweb/controllers/jmd.py	2010-04-15 08:27:56 UTC (rev 2362)
+++ wasko/branches/2.0/jmdweb/controllers/jmd.py	2010-04-15 08:29:32 UTC (rev 2363)
@@ -0,0 +1,21 @@
+import logging
+
+from mpulsweb.model.appointment import CaseReminderOverview
+from jmdweb.model.appointment import MaxSaveTimeReminderOverview
+import mpulsweb.lib.helpers as h
+from mpulsweb.controllers.mpuls import MpulsController
+
+log = logging.getLogger(__name__)
+
+class JmdController(MpulsController):
+
+    def get_reminders(self):
+        """Return an AppointmentOverview instance with reminders.
+        The overview always contains the max save time reminders. For case
+        managers it also contains the case reminders.
+        """
+        remindlist = MaxSaveTimeReminderOverview()
+        if h.hasRole(['cm']):
+            remindlist.join(CaseReminderOverview())
+            remindlist.sort()
+        return remindlist



More information about the Mpuls-commits mailing list