[Mpuls-commits] r3395 - in wasko/trunk: . waskoweb/templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Aug 13 12:17:05 CEST 2010
Author: torsten
Date: 2010-08-13 12:17:01 +0200 (Fri, 13 Aug 2010)
New Revision: 3395
Added:
wasko/trunk/waskoweb/templates/casemanagement/digest_body.mako
Modified:
wasko/trunk/ChangeLog
wasko/trunk/wasko.json
Log:
Added custom digest for wasko
Modified: wasko/trunk/ChangeLog
===================================================================
--- wasko/trunk/ChangeLog 2010-08-13 09:27:14 UTC (rev 3394)
+++ wasko/trunk/ChangeLog 2010-08-13 10:17:01 UTC (rev 3395)
@@ -1,3 +1,11 @@
+2010-08-13 Torsten Irländer <torsten.irlaender at intevation.de>
+
+ Added custom digest for WAKSO:
+
+ * waskoweb/templates/casemanagement/digest_body.mako: New digest
+ template
+ * wasko.json: Load more fields for WASKO in case loading (digest).
+
2010-08-12 Torsten Irländer <torsten.irlaender at intevation.de>
Enabled evaluations:
Modified: wasko/trunk/wasko.json
===================================================================
--- wasko/trunk/wasko.json 2010-08-13 09:27:14 UTC (rev 3394)
+++ wasko/trunk/wasko.json 2010-08-13 10:17:01 UTC (rev 3395)
@@ -19,7 +19,7 @@
},
"phases": {
"phases": ["0","1","2"],
- "changemode" : 0,
+ "changemode" : "0",
"description": [{
"-1": "Unbekannt",
"0": "Eingangsdokumentation",
@@ -118,11 +118,6 @@
},
"case": {
"fields": [
- {"name":"fn", "digest":true,
- "search_retrieve":true, "search_match":true,
- "preload":true, "session":true, "alias": "fn",
- "overview":false, "overview_label": "FN", "info":true,
- "info_label":"Fallnummer"},
{"name":"name", "digest":true,
"search_retrieve":true, "search_match":true,
"preload":true, "session":true, "alias":"last_name",
@@ -133,14 +128,42 @@
"preload":true, "session":true, "alias":"first_name",
"overview":true, "overview_label": "Vorname", "info":true,
"info_label":"Vorname"},
- {"name":"addresse_strasse_1",
+ {"name":"fn", "digest":true,
+ "search_retrieve":true, "search_match":true,
+ "preload":true, "session":true, "alias": "fn",
+ "overview":false, "overview_label": "FN", "info":true,
+ "info_label":"Fallnummer"},
+ {"name":"geburtsdatum", "digest":true},
+ {"name":"addresse_strasse_1", "digest":true,
"session":true, "alias":"street", "alias_force_string":true},
- {"name":"addresse_strassenr_1",
+ {"name":"addresse_strassenr_1", "digest":true,
"session":true, "alias":"streetnr", "alias_force_string":true},
- {"name":"addresse_plz_1",
+ {"name":"addresse_plz_1", "digest":true,
"session":true, "alias":"plz", "alias_force_string":true},
- {"name":"addresse_ort_1",
+ {"name":"addresse_ort_1", "digest":true,
"session":true, "alias":"city", "alias_force_string":true},
+ {"name":"addresse1_vorwahl_1", "digest":true},
+ {"name":"addresse1_telefonnummer_1", "digest":true},
+ {"name":"addresse2_vorwahl_1", "digest":true},
+ {"name":"addresse2_telefonnummer_2", "digest":true},
+ {"name":"addresse_weiteretelefonnummern_1", "digest":true},
+ {"name":"addresse_email_1", "digest":true},
+ {"name":"mutter_n", "digest":true},
+ {"name":"mutter_vn", "digest":true},
+ {"name":"mutter_vorwahl1_1", "digest":true},
+ {"name":"mutter_telefonnummer1_1", "digest":true},
+ {"name":"mutter_vorwahl2_1", "digest":true},
+ {"name":"mutter_telefonnummer2_1", "digest":true},
+ {"name":"mutter_email_1", "digest":true},
+ {"name":"vater_n", "digest":true},
+ {"name":"vater_vn", "digest":true},
+ {"name":"vater_vorwahl1_1", "digest":true},
+ {"name":"vater_telefonnummer1_1", "digest":true},
+ {"name":"vater_vorwahl2_1", "digest":true},
+ {"name":"vater_telefonnummer2_1", "digest":true},
+ {"name":"vater_email_1", "digest":true},
+ {"name":"cm_end_art", "digest":true},
+ {"name":"cm_end_verm", "digest":true},
{"name":"bearbeiter_id", "search_retrieve":true,
"preload":true, "alias":"editor", "alias_force_string":true}
],
Added: wasko/trunk/waskoweb/templates/casemanagement/digest_body.mako
===================================================================
--- wasko/trunk/waskoweb/templates/casemanagement/digest_body.mako 2010-08-13 09:27:14 UTC (rev 3394)
+++ wasko/trunk/waskoweb/templates/casemanagement/digest_body.mako 2010-08-13 10:17:01 UTC (rev 3395)
@@ -0,0 +1,61 @@
+## -*- coding: utf-8 -*-
+<%inherit file="digest.mako" />
+<%! import mpulsweb.lib.helper.filters as F %>
+
+<%def name="renderCaseInfo(case)">
+ <h2>${_('cm_header_digest_youth')}</h2>
+ <table>
+ % for num, field in enumerate(c.case.get_digest_fields()):
+ % if field.name in ['name', 'vorname', 'geburtsdatum', 'fn', 'addresse_strasse_1', 'addresse_strassenr_1', 'addresse_plz_1', 'addresse_ort_1', 'addresse1_vorwahl_1', 'addresse1_telefonnummer_1', 'addresse2_vorwahl_1', 'addresse2_telefonnummer_2', 'addresse_email_1', 'addresse_weiteretelefonnummern_1']:
+ <tr class="${num % 2 and 'hl' or ''}">
+ <td class="label">${c.case.get_description(field.name)}</td>
+ <td>${c.case.get_value(field.name)| F.NA}</td>
+ </tr>
+ %endif
+ % endfor
+ </table>
+ <h2>${_('Angaben zum Erziehungsberechtigten')}</h2>
+ <h3>${_('Angaben zur Mutter')}</h3>
+ <table>
+ % for num, field in enumerate(c.case.get_digest_fields()):
+ % if field.name in ['mutter_n', 'mutter_vn', 'mutter_vorwahl1_1', 'mutter_telefonnummer1_1', 'mutter_vorwahl2_1', 'mutter_telefonnummer2_1', 'mutter_email_1']:
+ <tr class="${num % 2 and 'hl' or ''}">
+ <td class="label">${c.case.get_description(field.name)}</td>
+ <td>${c.case.get_value(field.name)| F.NA}</td>
+ </tr>
+ %endif
+ % endfor
+ </table>
+ <h3>${_('Angaben zum Vater')}</h3>
+ <table>
+ % for num, field in enumerate(c.case.get_digest_fields()):
+ % if field.name in ['vater_n', 'vater_vn', 'vater_vorwahl1_1', 'vater_telefonnummer1_1', 'vater_vorwahl2_1', 'vater_telefonnummer2_1', 'vater_email_1']:
+ <tr class="${num % 2 and 'hl' or ''}">
+ <td class="label">${c.case.get_description(field.name)}</td>
+ <td>${c.case.get_value(field.name)| F.NA}</td>
+ </tr>
+ %endif
+ % endfor
+ </table>
+</%def>
+
+<%def name="renderCustomCaseStateInfo(case)">
+ <%
+ mapping_1 = c.case.get_formed_item('cm_end_art').getMeta().getValueMapping()
+ mapping_2 = c.case.get_formed_item('cm_end_verm').getMeta().getValueMapping()
+ %>
+ % if case.getState().isCmFinished():
+ <tr class="">
+ <td class="label">Art Beendigung</td>
+ <td>${mapping_1.get(c.case.get_value('cm_end_art'))}</td>
+ </tr>
+ <tr class="hl">
+ <td class="label">${c.case.get_description('cm_end_verm')}</td>
+ <td>${mapping_2.get(c.case.get_value('cm_end_verm'))}</td>
+ </tr>
+ % endif
+</%def>
+
+${self.renderMaxSavetimeInfo(c.case)}
+${self.renderCaseStateInfo(c.case)}
+${self.renderCaseInfo(c.case)}
More information about the Mpuls-commits
mailing list