[Mpuls-commits] r832 - in wasko/branches/2.0: . waskaweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jan 22 15:53:55 CET 2010


Author: bh
Date: 2010-01-22 15:53:54 +0100 (Fri, 22 Jan 2010)
New Revision: 832

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako
Log:
* waskaweb/templates/casemanagement/caselist.mako: Move list row
code into a separate function.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-01-22 14:50:07 UTC (rev 831)
+++ wasko/branches/2.0/ChangeLog	2010-01-22 14:53:54 UTC (rev 832)
@@ -1,5 +1,10 @@
 2010-01-22  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/templates/casemanagement/caselist.mako: Move list row
+	code into a separate function.
+
+2010-01-22  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/templates/casemanagement/caselist.mako: build table
 	header rows and data row using a list of column descriptions.
 

Modified: wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako
===================================================================
--- wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako	2010-01-22 14:50:07 UTC (rev 831)
+++ wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako	2010-01-22 14:53:54 UTC (rev 832)
@@ -56,6 +56,21 @@
   </th>
 </%def>
 
+<%def name="build_list_row(case)">
+  <td><input type="checkbox" name="case_id" value="${case.id}"></td>
+  % for title, urlpart, style, roles, get_value in fields:
+    % if h.hasRole(roles):
+     <td>${get_value(case) | F.NA, h}</td>
+    % endif
+  % endfor
+  <td>
+    ${get_state_icon(case)}
+  </td>
+  <td>
+    ${get_actions(case)}
+  </td>
+</%def>
+
 <%def name="get_state_icon(case)">
   % if h.hasRole(['cm_ka']):
     % if str(case.getEditor().id) == str(session.get('USER_AUTHORIZED').id):
@@ -131,18 +146,7 @@
   </tr>
   % for num, case in enumerate(c.cases.getDatasets()):
       <tr class="${num % 2 and 'table_row_h' or ''}">
-        <td><input type="checkbox" name="case_id" value="${case.id}"></td>
-        % for title, urlpart, style, roles, get_value in fields:
-          % if h.hasRole(roles):
-            <td>${get_value(case) | F.NA, h}</td>
-          % endif
-        % endfor
-        <td>
-          ${get_state_icon(case)}
-        </td>
-        <td>
-          ${get_actions(case)}
-        </td>
+        ${build_list_row(case)}
       </tr>
   % endfor
   % if len(c.cases.getDatasets()) <= 0:



More information about the Mpuls-commits mailing list