[Mpuls-commits] r1523 - in wasko/branches/2.0: . waskaweb/templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Feb 11 20:01:01 CET 2010
Author: bh
Date: 2010-02-11 20:00:59 +0100 (Thu, 11 Feb 2010)
New Revision: 1523
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/waskaweb/templates/casemanagement/digest_body.mako
Log:
* waskaweb/templates/casemanagement/digest_body.mako: Use the
case's get_digest_fields() method to retrieve the list of fields
to show in the digest instead of using a hard-wired list.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-02-11 18:59:34 UTC (rev 1522)
+++ wasko/branches/2.0/ChangeLog 2010-02-11 19:00:59 UTC (rev 1523)
@@ -1,5 +1,11 @@
2010-02-11 Bernhard Herzog <bh at intevation.de>
+ * waskaweb/templates/casemanagement/digest_body.mako: Use the
+ case's get_digest_fields() method to retrieve the list of fields
+ to show in the digest instead of using a hard-wired list.
+
+2010-02-11 Bernhard Herzog <bh at intevation.de>
+
* waskaweb/model/case.py (Field.__init__): New parameter and
instance variable: digest. Indicates whether the field is listed
in the case digest.
Modified: wasko/branches/2.0/waskaweb/templates/casemanagement/digest_body.mako
===================================================================
--- wasko/branches/2.0/waskaweb/templates/casemanagement/digest_body.mako 2010-02-11 18:59:34 UTC (rev 1522)
+++ wasko/branches/2.0/waskaweb/templates/casemanagement/digest_body.mako 2010-02-11 19:00:59 UTC (rev 1523)
@@ -1,35 +1,6 @@
## -*- coding: utf-8 -*-
<%!
import mpulsweb.lib.helper.filters as F
-
-## The names of the fields to show in the case digest. The names are
-## the ones used in the formed descripttion. Any name outside of repeat
-## groups can be used.
-
-fields = [
- "name",
- "vorname",
- "fn",
- "geburtsdatum",
- "addresse_strasse",
- "addresse_strassenr",
- "addresse_plz",
- "addresse_ort",
- "addresse_vorwahl",
- "addresse_telefonnummer",
- "addresse_weiteretelefonnummern",
- "addresse_email",
- "mutter_vn",
- "mutter_n",
- "mutter_vorwahl",
- "mutter_telefonnummer",
- "mutter_email",
- "vater_vn",
- "vater_n",
- "vater_vorwahl",
- "vater_telefonnummer",
- "vater_email",
- ]
%>
<div id="content_header_small">
@@ -96,10 +67,10 @@
<h2>${_('cm_header_digest_youth')}</h2>
<table>
- % for num, name in enumerate(fields):
+ % for num, field in enumerate(c.case.get_digest_fields()):
<tr class="${num % 2 and 'hl' or ''}">
- <td class="label">${c.case.get_description(name)}</td>
- <td>${c.case.get_value(name) | F.NA, h}</td>
+ <td class="label">${c.case.get_description(field.name)}</td>
+ <td>${c.case.get_value(field.name) | F.NA, h}</td>
</tr>
% endfor
</table>
More information about the Mpuls-commits
mailing list