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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 3 09:40:19 CEST 2010


Author: torsten
Date: 2010-08-03 09:40:18 +0200 (Tue, 03 Aug 2010)
New Revision: 3307

Modified:
   base/trunk/mpulsweb/templates/phase/phase.mako
Log:
Improved rendering of phases page. Fields are now separated in pages.


Modified: base/trunk/mpulsweb/templates/phase/phase.mako
===================================================================
--- base/trunk/mpulsweb/templates/phase/phase.mako	2010-08-03 07:17:41 UTC (rev 3306)
+++ base/trunk/mpulsweb/templates/phase/phase.mako	2010-08-03 07:40:18 UTC (rev 3307)
@@ -61,7 +61,17 @@
           % else:
           <td class="error"></td>
           % endif
-          <td class="note" style="border-bottom: 1pt dotted; border-color: #000;">${h.literal(p1.getLinks())}</td>
+          <td class="note" style="border-bottom: 1pt dotted; border-color: #000;">
+            <% pages, order = p1.getLinks() %>
+            % for key in order:
+              <% fields = pages.get(key, []) %>
+              % if len(fields) > 0:
+                <strong>${key}</strong>:
+                ${h.literal(", ".join([f.get_link() for f in fields]))}
+              % endif
+              <br>
+            % endfor
+          </td>
           <td class="note center middle" style="border-bottom: 1pt dotted; border-color: #000;">
             ${h.NA(h.format_date(p1.getTime()))}
           </td>
@@ -79,7 +89,17 @@
           % else:
           <td class="error"></td>
           % endif
-          <td class="note">${h.literal(p2.getLinks())}</td>
+          <td class="note">
+            <% pages, order = p2.getLinks() %>
+            % for key in order:
+              <% fields = pages.get(key) %>
+              % if len(fields) > 0:
+                <strong>${key}</strong>:
+                ${h.literal(", ".join([f.get_link() for f in fields]))}
+              % endif
+              <br>
+            % endfor
+          </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:



More information about the Mpuls-commits mailing list