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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 24 16:01:54 CET 2010


Author: torsten
Date: 2010-02-24 16:01:52 +0100 (Wed, 24 Feb 2010)
New Revision: 1756

Modified:
   wasko/branches/2.0/mpulsweb/templates/phase/phase.mako
Log:
Display phase duration


Modified: wasko/branches/2.0/mpulsweb/templates/phase/phase.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/phase/phase.mako	2010-02-24 15:01:33 UTC (rev 1755)
+++ wasko/branches/2.0/mpulsweb/templates/phase/phase.mako	2010-02-24 15:01:52 UTC (rev 1756)
@@ -83,34 +83,32 @@
   </form>
 </div>
 
-####
-#### DAUER DER PHASEN
-####
-##<div>
-##  <h2>Dauer der Phasen</h2>
-##  <table>
-##    <tr>
-##      <th class="table_header_h">Phase</th>
-##      <th style="text-align:right" class="table_header_h">Dauer in Wochen</th>
-##    </tr>
-##    <% total = None %>
-##    % for phase_pair in c.phase_pairs:
-##    <tr>
-##      <td>${phase_pair.getDescription()}</td>
-##      <td style="text-align:right">
-##      <% 
-##        t = phase_pair.getDuration();
-##        if t: total = total and (total + t) or t
-##      %>
-##      ${h.timedelta_in_weeks(t, '-/-')}
-##      </td>
-##    </tr>
-##    % endfor
-##    <tr>
-##      <td style="border-top:1px solid"><strong>Gesamt</strong></td>
-##      <td style="border-top:1px solid; text-align:right">
-##        <strong>${h.timedelta_in_weeks(total, '-/-')}</strong>
-##      </td>
-##    </tr>
-##  </table>
-##</div>
+##
+## DAUER DER PHASEN
+##
+<h2>${_('Duration of phases')}</h2>
+<div class="widget container">
+  <% total = None %>
+  <table>
+    <tr>
+      <th>${_('Phase')}</th>
+      <th class="actions">${_('Duration')}</th>
+    </tr>
+    % for num, phase in enumerate(c.phases): 
+      <% 
+        t = phase.getDuration() 
+        if t: total = total and (total + t) or t
+      %>
+      <tr class="${num%2 and 'hl' or ''}">
+        <td>${phase.getDescription()}</td>
+        <td class="actions">${h.NA(h.timedelta_in_weeks(t))}</td>
+      </tr>
+    % endfor
+    <tr>
+      <td style="border-top:1px solid"><strong>Gesamt</strong></td>
+      <td style="border-top:1px solid; text-align:right">
+        <strong>${h.timedelta_in_weeks(total, '-/-')}</strong>
+      </td>
+    </tr>
+      </table>
+</div>



More information about the Mpuls-commits mailing list