[Mpuls-commits] r629 - in wasko/branches/1.0: . waskaweb/controllers waskaweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 9 15:41:13 CEST 2009


Author: torsten
Date: 2009-10-09 15:41:11 +0200 (Fri, 09 Oct 2009)
New Revision: 629

Modified:
   wasko/branches/1.0/ChangeLog.txt
   wasko/branches/1.0/waskaweb/controllers/case.py
   wasko/branches/1.0/waskaweb/templates/casemanagement/phase.mako
Log:
Issue504


Modified: wasko/branches/1.0/ChangeLog.txt
===================================================================
--- wasko/branches/1.0/ChangeLog.txt	2009-10-08 08:41:20 UTC (rev 628)
+++ wasko/branches/1.0/ChangeLog.txt	2009-10-09 13:41:11 UTC (rev 629)
@@ -1,5 +1,13 @@
 2009-10-08	Torsten Irlaender	<torsten.irlaender at intevation.de> 
+	
+	Issue504
 
+	* waskaweb/controllers/case.py,
+	  waskaweb/templates/casemanagement/phase.mako: Only allow to start NB
+	  if the case manager indicates that it is really planed. 
+
+2009-10-08	Torsten Irlaender	<torsten.irlaender at intevation.de> 
+
 	Set Version string to 1.1.0
 
 	* waskaweb/i18n/waskaweb.pot

Modified: wasko/branches/1.0/waskaweb/controllers/case.py
===================================================================
--- wasko/branches/1.0/waskaweb/controllers/case.py	2009-10-08 08:41:20 UTC (rev 628)
+++ wasko/branches/1.0/waskaweb/controllers/case.py	2009-10-09 13:41:11 UTC (rev 629)
@@ -814,6 +814,10 @@
         c.phase_pairs   = rf.phases_pairs(phase, navigation, link)
         c.current_phase = Phase(phase, True)
 
+        D = g.formedTree.getData
+        nbtr = int(D('nbtr'))
+        c.nachbetreuung_geplant = nbtr not in [1,-1,-3]
+
         c.global_warnings = g.formedTree.linksToGlobalWarnings(id, navigation, link)
         c.form_navigation = self._getFormNavigation()
         return render('/casemanagement/phase.mako')

Modified: wasko/branches/1.0/waskaweb/templates/casemanagement/phase.mako
===================================================================
--- wasko/branches/1.0/waskaweb/templates/casemanagement/phase.mako	2009-10-08 08:41:20 UTC (rev 628)
+++ wasko/branches/1.0/waskaweb/templates/casemanagement/phase.mako	2009-10-09 13:41:11 UTC (rev 629)
@@ -50,7 +50,7 @@
       <td>${h.dd_mm_YYYY(p1.getTime(), '-/-')}</td>
       <td style="text-align:right">
         % if is_allowed:
-            % if (p1.isRecursiveComplete() and not p1.isRunning() and (p1.isNeighbor(c.current_phase) or c.current_phase.hasPredecessor(p1))):
+            % if (p1.isRecursiveComplete() and not p1.isRunning() and (p1.isNeighbor(c.current_phase) or c.current_phase.hasPredecessor(p1))) and (c.current_phase.phase == 3 and c.nachbetreuung_geplant):
                 <input type="submit" value="Start" name="${p1.getLabel()|h}">
             % else:
                 <input type="submit" value="Start" name="${p1.getLabel()|h}"



More information about the Mpuls-commits mailing list