[Mpuls-commits] r1752 - wasko/branches/2.0/mpulsweb/templates/phase

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 24 15:37:41 CET 2010


Author: torsten
Date: 2010-02-24 15:37:41 +0100 (Wed, 24 Feb 2010)
New Revision: 1752

Modified:
   wasko/branches/2.0/mpulsweb/templates/phase/phase.mako
Log:
* mpulsweb/templates/phase/phase.mako: Display phase relevant date


Modified: wasko/branches/2.0/mpulsweb/templates/phase/phase.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/phase/phase.mako	2010-02-24 14:36:57 UTC (rev 1751)
+++ wasko/branches/2.0/mpulsweb/templates/phase/phase.mako	2010-02-24 14:37:41 UTC (rev 1752)
@@ -11,73 +11,78 @@
 <div class="form_errors">${c.global_warnings}</div>
 % endif
 
-<div class="waska_form">
 <h2>${_('case_cm_phase')}</h2>
-<form method="POST" action="${h.url_for(controller='/phase', action='setAction')}">
-  <input type="hidden" name="case_id" value="${session.get('case').id}">
-  <table id="cmphases">
-    <% is_allowed = h.hasRole(('cm_ka',)) %>
-    <tr>
-      <th class="table_header_h" width="18%">${_('cm_info_phase')}</th>
-      <th class="table_header_h" width="3%">&nbsp;</th>
-      <th class="table_header_h" width="44%">${_('case_cm_phase_required_fields')}</th>
-      <th class="table_header_h" width="15%">${_('case_cm_phase_time')}</th>
-      <th style="text-align:right" class="table_header_h" width="20%">
-      % if is_allowed:
-      ${_('case_cm_phase_change')}
-      % endif
-      </th>
-    </tr>
-    % for num, phase in enumerate(c.phases): 
-    <% p1, p2 = phase.getStart(), phase.getEnd()  %>
-    <tr class="${(num%2) and 'hl' or ''}">
-      <td rowspan="2" class="cm_phase_state">
-        ${phase.getDescription()}<br>
-        % if p1.is_active():
-          ${_('Running')}
-        % elif p2.is_active():
-          ${_('Finished')}
-        % elif (c.phases.get_current_phase_id() > p2.id) or (c.phases.get_current_phase_id() > p1.id):
-          ${_('Finished')}
-        % else:
-          ${_('Not yet started')}
+<div class="widget container">
+  <form method="POST" action="${h.url_for(controller='/phase', action='setAction')}">
+    <input type="hidden" name="case_id" value="${session.get('case').id}">
+    <table id="cmphases">
+      <% is_allowed = h.hasRole(('cm_ka',)) %>
+      <tr>
+        <th>${_('cm_info_phase')}</th>
+        <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')}
         % endif
-      </td>
-      % if p1.is_ok():
-      <td class="cm_phase_state_valid cm_phase_state"></td>
-      % else:
-      <td class="cm_phase_state_invalid cm_phase_state"></td>
-      % endif
-      <td class="cm_phase_state">${p1.getLinks()}</td>
-      <td class="cm_phase_state">${p1.getTime()}</td>
-      <td class="cm_phase_state">
+        </th>
+      </tr>
+      % for num, phase in enumerate(c.phases): 
+      <% p1, p2 = phase.getStart(), phase.getEnd()  %>
+      <tr class="${(num%2) and 'hl' or ''}">
+        <td rowspan="2" class="bold center middle">
+          ${phase.getDescription()}<br>
+          <span class="note">
+          % if p1.is_active():
+            ${_('Running')}
+          % elif p2.is_active():
+            ${_('Finished')}
+          % elif (c.phases.get_current_phase_id() > p2.id) or (c.phases.get_current_phase_id() > p1.id):
+            ${_('Finished')}
+          % else:
+            ${_('Not yet started')}
+          % endif
+          </span>
+        </td>
         % if p1.is_ok():
-          <input type="submit" name="phase_${p1.id}" value="${_('Start')}">
+        <td class="ok"></td>
         % else:
-          <input type="submit" name="phase_${p1.id}" value="${_('Start')}" disabled="disabled">
+        <td class="error"></td>
         % endif
-      </td>
-    </tr>
-    <tr class="${(num%2) and 'hl' or ''}">
-      % if p2.is_ok():
-      <td class="cm_phase_state_valid cm_phase_state}"></td>
-      % else:
-      <td class="cm_phase_state_invalid cm_phase_state"></td>
-      % endif
-      <td class="cm_phase_state">${p2.getLinks()}</td>
-      <td class="cm_phase_state">${p2.getTime()}</td>
-      <td class="cm_phase_state">
+        <td class="note" style="border-bottom: 1pt dotted; border-color: #000;">${p1.getLinks()}</td>
+        <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():
+            <input type="submit" name="phase_${p1.id}" value="${_('Start')}">
+          % else:
+            <input type="submit" name="phase_${p1.id}" value="${_('Start')}" disabled="disabled">
+          % endif
+        </td>
+      </tr>
+      <tr class="${(num%2) and 'hl' or ''}">
         % if p2.is_ok():
-          <input type="submit" name="phase_${p2.id}" value="${_('Finish')}">
+        <td class="ok"></td>
         % else:
-          <input type="submit" name="phase_${p2.id}" value="${_('Finish')}" disabled="disabled">
+        <td class="error"></td>
         % endif
-      </td>
-    </tr>
-    % endfor
-  </table>
-</form>
+        <td class="note">${p2.getLinks()}</td>
+        <td class="note center middle">${h.NA(h.format_date(p2.getTime()))}</td>
+        <td class="actions">
+          % if p2.is_ok():
+            <input type="submit" name="phase_${p2.id}" value="${_('Finish')}">
+          % else:
+            <input type="submit" name="phase_${p2.id}" value="${_('Finish')}" disabled="disabled">
+          % endif
+        </td>
+      </tr>
+      % endfor
+    </table>
+  </form>
 </div>
+
 ####
 #### DAUER DER PHASEN
 ####



More information about the Mpuls-commits mailing list