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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jan 22 12:18:43 CET 2010


Author: bh
Date: 2010-01-22 12:18:42 +0100 (Fri, 22 Jan 2010)
New Revision: 828

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako
Log:
* waskaweb/templates/casemanagement/caselist.mako: Move the code
for the table headers into a separate function.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-01-22 11:12:57 UTC (rev 827)
+++ wasko/branches/2.0/ChangeLog	2010-01-22 11:18:42 UTC (rev 828)
@@ -1,5 +1,10 @@
 2010-01-22  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/templates/casemanagement/caselist.mako: Move the code
+	for the table headers into a separate function.
+
+2010-01-22  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/model/case.py: Fix formatting.
 
 2010-01-22  Torsten Irländer <torsten.irlaender at intevation.de>

Modified: wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako
===================================================================
--- wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako	2010-01-22 11:12:57 UTC (rev 827)
+++ wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako	2010-01-22 11:18:42 UTC (rev 828)
@@ -1,33 +1,37 @@
 ## -*- coding: utf-8 -*-
 <%! import waskaweb.lib.filters as F %>
+<%def name="build_list_headers()">
+  <th class="table_header_h table_checkbox">&nbsp;</th>
+  <th class="table_id table_header_h">${_('cm_overview_tbl_header_id')}
+    <a href="/case_overview/overview/0/kundennummer/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
+    <a href="/case_overview/overview/0/kundennummer/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+  </th>
+  <th class="table_name table_header_h">${_('cm_overview_tbl_header_lastname')}
+    <a href="/case_overview/overview/0/name_1/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
+    <a href="/case_overview/overview/0/name_1/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+  </th>
+  <th class="table_name table_header_h">${_('cm_overview_tbl_header_firstname')}
+    <a href="/case_overview/overview/0/vorname_1/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
+    <a href="/case_overview/overview/0/vorname_1/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+  </th>
+  % if h.hasRole(['admin_ka']):
+    <th class="table_name table_header_h">${_('cm_overview_tbl_header_editor')}
+      <a href="/case_overview/overview/0/bearbeiter_id/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
+      <a href="/case_overview/overview/0/bearbeiter_id/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+    </th>
+  % else:
+    <th class="table_name table_header_h">${_('cm_overview_tbl_header_accesstime')}
+      <a href="/case_overview/overview/0/zugriff/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
+      <a href="/case_overview/overview/0/zugriff/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+    </th>
+  % endif
+  <th class="table_status table_header_h">${_('cm_overview_tbl_header_status')}</th>
+  <th class="table_action table_header_h">${_('cm_overview_tbl_header_actions')}</th>
+</%def>
+
 <table>
   <tr>
-    <th class="table_header_h table_checkbox">&nbsp;</th>
-    <th class="table_id table_header_h">${_('cm_overview_tbl_header_id')}
-      <a href="/case_overview/overview/0/kundennummer/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-      <a href="/case_overview/overview/0/kundennummer/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
-    </th>
-    <th class="table_name table_header_h">${_('cm_overview_tbl_header_lastname')}
-      <a href="/case_overview/overview/0/name_1/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-      <a href="/case_overview/overview/0/name_1/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
-    </th>
-    <th class="table_name table_header_h">${_('cm_overview_tbl_header_firstname')}
-      <a href="/case_overview/overview/0/vorname_1/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-      <a href="/case_overview/overview/0/vorname_1/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
-    </th>
-    % if h.hasRole(['admin_ka']):
-      <th class="table_name table_header_h">${_('cm_overview_tbl_header_editor')}
-        <a href="/case_overview/overview/0/bearbeiter_id/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-        <a href="/case_overview/overview/0/bearbeiter_id/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
-      </th>
-    % else:
-      <th class="table_name table_header_h">${_('cm_overview_tbl_header_accesstime')}
-        <a href="/case_overview/overview/0/zugriff/asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-        <a href="/case_overview/overview/0/zugriff/desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
-      </th>
-    % endif
-    <th class="table_status table_header_h">${_('cm_overview_tbl_header_status')}</th>
-    <th class="table_action table_header_h">${_('cm_overview_tbl_header_actions')}</th>
+    ${build_list_headers()}
   </tr>
   <% idset = True %>
   % for case in c.cases.getDatasets():



More information about the Mpuls-commits mailing list