[Mpuls-commits] r3871 - base/trunk/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 4 14:23:37 CEST 2010


Author: torsten
Date: 2010-10-04 14:23:37 +0200 (Mon, 04 Oct 2010)
New Revision: 3871

Modified:
   base/trunk/mpulsweb/controllers/phase.py
Log:
* mpulsweb/controllers/phase.py (PhaseController.overview): Issue1256:
	Actions on phasepage are only displayed when changemode of phases is not full
	automatic.


Modified: base/trunk/mpulsweb/controllers/phase.py
===================================================================
--- base/trunk/mpulsweb/controllers/phase.py	2010-10-04 12:10:59 UTC (rev 3870)
+++ base/trunk/mpulsweb/controllers/phase.py	2010-10-04 12:23:37 UTC (rev 3871)
@@ -1,12 +1,12 @@
 # -*- coding: utf-8 -*-
 import logging
 
-from pylons import c
+from pylons import c, g
 
 from mpulsweb.lib.translation import _
 from mpulsweb.lib.base import BaseController, h, render, request
 from mpulsweb.lib.security import checkRole
-from mpulsweb.model.phase import PhaseFactory
+from mpulsweb.model.phase import PhaseFactory, PC_FULLAUTO
 
 
 SET_PHASE_NOTIFICATION_SUCCESS = _(u"Phase changed!")
@@ -26,6 +26,8 @@
     def overview(self, id):
         id = self._checkInt(id)
         c.phases = PhaseFactory().load(id)
+        # Only show buttons to set the phase if 
+        c.show_actions = g.mpuls_config.get('phases', 'changemode') != PC_FULLAUTO 
         return render('/phase/phase.mako')
 
     @checkRole(('cm_ka'))



More information about the Mpuls-commits mailing list