[Mpuls-commits] r1476 - wasko/branches/2.0/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 10 17:36:32 CET 2010


Author: torsten
Date: 2010-02-10 17:36:32 +0100 (Wed, 10 Feb 2010)
New Revision: 1476

Modified:
   wasko/branches/2.0/mpulsweb/controllers/mpuls.py
Log:
* mpulsweb/controllers/mpuls.py (get_global_appointments): Copied from
waskaweb. Load global appointments



Modified: wasko/branches/2.0/mpulsweb/controllers/mpuls.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/mpuls.py	2010-02-10 16:30:42 UTC (rev 1475)
+++ wasko/branches/2.0/mpulsweb/controllers/mpuls.py	2010-02-10 16:36:32 UTC (rev 1476)
@@ -4,6 +4,7 @@
 from pylons.controllers.util import abort, redirect_to
 
 from mpulsweb.model.news import NewsList
+from mpulsweb.model.appointment import GlobalAppointmentOverview
 from mpulsweb.lib.base import BaseController, render
 
 log = logging.getLogger(__name__)
@@ -11,6 +12,9 @@
 def get_newslist(user):
     return NewsList(user)
 
+def get_global_appointments():
+    return GlobalAppointmentOverview()
+
 class MpulsController(BaseController):
 
     def index(self):
@@ -21,4 +25,10 @@
             log.debug('Loading news list')
             c.news = get_newslist(user)
 
+        # LOAD APPOINTMENTS
+        if g.mpuls_config.is_enabled('module', 'appointments'):
+            # Global appointments
+            log.debug('Loading global appointment list')
+            c.globalappointmentlist = get_global_appointments()
+
         return render('/home/home.mako')



More information about the Mpuls-commits mailing list