[Mpuls-commits] r2042 - wasko/branches/2.0/mpulsweb/templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Mar 19 15:33:41 CET 2010
Author: torsten
Date: 2010-03-19 15:33:40 +0100 (Fri, 19 Mar 2010)
New Revision: 2042
Modified:
wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako
Log:
* mpulsweb/templates/casemanagement/caselist.mako: Which fields are
shown in overview ist no determined by settings in the json file.
Modified: wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako 2010-03-19 14:31:49 UTC (rev 2041)
+++ wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako 2010-03-19 14:33:40 UTC (rev 2042)
@@ -2,6 +2,7 @@
<%!
from pylons.i18n import _
+from pylons import app_globals as g
import mpulsweb.lib.helper.filters as F
import mpulsweb.lib.helpers as h
@@ -25,17 +26,18 @@
## called with the case object as argument and which should return the
## formatted value for the column.
-fields = [
- (_('cm_overview_tbl_header_id'), "kundennummer", "table_id", all_roles,
- lambda case: h.shorten(hide_if_anonymized(case, case.knr), 15)),
+fields = []
+for d in g.case.get_overview_fields():
+ f = d.name
+ fn = d.overview_label
+ fs = d.overview_style
+ print f
+ field = (fn,f,fs, all_roles,
+ lambda case, f=f: h.shorten(hide_if_anonymized(case, case.get_value(f)), 15))
+ fields.append(field)
- (_('cm_overview_tbl_header_lastname'), "name_1", "table_name", all_roles,
- lambda case: h.shorten(hide_if_anonymized(case, case.last_name), 15)),
-
- (_('cm_overview_tbl_header_firstname'), "vorname_1", "table_name",
- all_roles,
- lambda case: h.shorten(hide_if_anonymized(case, case.first_name),15)),
-
+# Extend fields with default fields in overview
+fields.extend([
(_('cm_overview_tbl_header_editor'), "bearbeiter_id", "table_name",
["admin"],
lambda case: "%s, %s" % (F.NA(case.getEditor().last_name),
@@ -43,7 +45,7 @@
(_('cm_overview_tbl_header_accesstime'), "zugriff", "table_name", ["cm"],
lambda case: h.format_date(case.state.getAccessTime())),
- ]
+ ])
%>
<%def name="build_list_headers()">
More information about the Mpuls-commits
mailing list