[Mpuls-commits] r1290 - in wasko/branches/2.0: . waskaweb/templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Feb 5 18:53:50 CET 2010
Author: bh
Date: 2010-02-05 18:53:45 +0100 (Fri, 05 Feb 2010)
New Revision: 1290
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako
Log:
* waskaweb/templates/casemanagement/caselist.mako: Add a comment
describing the structure of the fields list.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-02-05 17:21:33 UTC (rev 1289)
+++ wasko/branches/2.0/ChangeLog 2010-02-05 17:53:45 UTC (rev 1290)
@@ -1,5 +1,10 @@
2010-02-05 Bernhard Herzog <bh at intevation.de>
+ * waskaweb/templates/casemanagement/caselist.mako: Add a comment
+ describing the structure of the fields list.
+
+2010-02-05 Bernhard Herzog <bh at intevation.de>
+
* waskaweb/model/case.py (SessionCase.__init__): Make it possible
to pass all values that have to be stored in the session case in
the constructor. The case fields are defined by the
Modified: wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako
===================================================================
--- wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako 2010-02-05 17:21:33 UTC (rev 1289)
+++ wasko/branches/2.0/waskaweb/templates/casemanagement/caselist.mako 2010-02-05 17:53:45 UTC (rev 1290)
@@ -15,6 +15,16 @@
all_roles = ['admin', 'cm']
+## Fields to show in the case list. Each entry is a tuple of the form
+## (TITLE, FIELDNAME, STYLE, ROLES, FORMATTER)
+## Here, TITLE is the title of the field, FIELDNAME is the field name
+## used in the search URL that's built for each column, STYLE is a CSS
+## class name to use in the style attribute of the HTML TH-element,
+## ROLES is a list with the names of the roles for which the field
+## should be shown. Finally, FORMATTER is a python callable that is
+## 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)),
More information about the Mpuls-commits
mailing list