[Mpuls-commits] r3232 - base/trunk/mpulsweb/templates/phase

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 23 12:57:14 CEST 2010


Author: torsten
Date: 2010-07-23 12:57:09 +0200 (Fri, 23 Jul 2010)
New Revision: 3232

Modified:
   base/trunk/mpulsweb/templates/phase/phase.mako
Log:
* mpulsweb/templates/phase/phase.mako: Issue883: Disabled "Start" and
	"End" Buttons for users who does not have the role "cm"


Modified: base/trunk/mpulsweb/templates/phase/phase.mako
===================================================================
--- base/trunk/mpulsweb/templates/phase/phase.mako	2010-07-23 09:36:08 UTC (rev 3231)
+++ base/trunk/mpulsweb/templates/phase/phase.mako	2010-07-23 10:57:09 UTC (rev 3232)
@@ -58,7 +58,7 @@
           ${h.NA(h.format_date(p1.getTime()))}
         </td>
         <td class="actions middle" style="border-bottom: 1pt dotted; border-color: #000;">
-          % if p1.is_ok() and phases_are_valid and p1.is_neighbor(current_phase):
+          % if p1.is_ok() and phases_are_valid and p1.is_neighbor(current_phase) and h.hasRole(['cm']):
             <input type="submit" name="${p1.id}" value="${_('Start')}">
           % else:
             <input type="submit" name="${p1.id}" value="${_('Start')}" disabled="disabled">
@@ -74,7 +74,7 @@
         <td class="note">${h.literal(p2.getLinks())}</td>
         <td class="note center middle">${h.NA(h.format_date(p2.getTime()))}</td>
         <td class="actions">
-          % if p2.is_ok() and phases_are_valid and p2.is_neighbor(current_phase):
+          % if p2.is_ok() and phases_are_valid and p2.is_neighbor(current_phase) and h.hasRole(['cm']):
             <input type="submit" name="${p2.id}" value="${_('Finish')}">
           % else:
             <input type="submit" name="${p2.id}" value="${_('Finish')}" disabled="disabled">



More information about the Mpuls-commits mailing list