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

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


Author: torsten
Date: 2010-10-04 14:25:02 +0200 (Mon, 04 Oct 2010)
New Revision: 3872

Modified:
   base/trunk/mpulsweb/templates/phase/phase.mako
Log:
* mpulsweb/templates/phase/phase.mako: Issue1256: Display action buttons on phase
	page regarding to the new c.show_actions context variable.


Modified: base/trunk/mpulsweb/templates/phase/phase.mako
===================================================================
--- base/trunk/mpulsweb/templates/phase/phase.mako	2010-10-04 12:23:37 UTC (rev 3871)
+++ base/trunk/mpulsweb/templates/phase/phase.mako	2010-10-04 12:25:02 UTC (rev 3872)
@@ -22,11 +22,13 @@
         <th width="15px">&nbsp;</th>
         <th width="50%">${_('case_cm_phase_required_fields')}</th>
         <th>${_('case_cm_phase_time')}</th>
-        <th class="actions">
-        % if is_allowed:
-        ${_('Actions')}
+        % if c.show_actions:
+          <th class="actions">
+            % if is_allowed:
+              ${_('Actions')}
+            % endif
+          </th>
         % endif
-        </th>
       </tr>
       <% phases_are_valid = c.phases.is_valid() %>
       <% current_phase = c.phases.get_current_phase_id() %>
@@ -80,13 +82,15 @@
           <td class="note center middle" style="border-bottom: 1pt dotted; border-color: #000;">
             ${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) and h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
-              <input type="submit" name="${p1.id}" value="${_('Start')}">
-            % else:
-              <input type="submit" name="${p1.id}" value="${_('Start')}" disabled="disabled">
-            % endif
+          % if c.show_actions:
+            <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) and h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
+                <input type="submit" name="${p1.id}" value="${_('Start')}">
+              % else:
+                <input type="submit" name="${p1.id}" value="${_('Start')}" disabled="disabled">
+              % endif
           </td>
+          % endif
         </tr>
         <tr class="${(num%2) and 'hl' or ''}">
           % if p2.is_ok() and (c.phases.is_on_path(p2.id, current_phase, True) or c.phases.is_on_path(current_phase, p2.id, True)): 
@@ -110,13 +114,15 @@
             % endif
           </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) and h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
-              <input type="submit" name="${p2.id}" value="${_('Finish')}">
-            % else:
-              <input type="submit" name="${p2.id}" value="${_('Finish')}" disabled="disabled">
-            % endif
-          </td>
+          % if c.show_actions:
+            <td class="actions">
+              % if p2.is_ok() and phases_are_valid and p2.is_neighbor(current_phase) and h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
+                <input type="submit" name="${p2.id}" value="${_('Finish')}">
+              % else:
+                <input type="submit" name="${p2.id}" value="${_('Finish')}" disabled="disabled">
+              % endif
+            </td>
+          % endif
         </tr>
       % endif
       % endfor



More information about the Mpuls-commits mailing list