[Mpuls-commits] r2508 - wasko/branches/2.0/mpulsweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Apr 26 10:39:14 CEST 2010


Author: torsten
Date: 2010-04-26 10:39:13 +0200 (Mon, 26 Apr 2010)
New Revision: 2508

Modified:
   wasko/branches/2.0/mpulsweb/templates/casemanagement/main.mako
Log:
* mpulsweb/templates/casemanagement/main.mako: Generate Infofield from
	config. See "fields" in json-file.


Modified: wasko/branches/2.0/mpulsweb/templates/casemanagement/main.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/casemanagement/main.mako	2010-04-23 13:48:12 UTC (rev 2507)
+++ wasko/branches/2.0/mpulsweb/templates/casemanagement/main.mako	2010-04-26 08:39:13 UTC (rev 2508)
@@ -3,8 +3,6 @@
 <%!  import mpulsweb.lib.helper.filters as F %>
 ${next.body()}
 
-
-
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
   <li><a href="/case/" onclick="return checkModification();">${_('cm_np_root')}</a></li>
@@ -16,13 +14,14 @@
 <%def name="buildInfofield()">
   <% case = session.get('case') %>
   <div id="infofield">
-    <strong>${_('cm_info_name')}:</strong>
-       ${h.shorten(case.first_name, 15) | F.NA} 
-       ${h.shorten(case.last_name, 15)  | F.NA}<br>
+    % for f in g.case.get_infofield_fields():
+      <strong>${f.info_label}:</strong>
+      ${h.shorten(case.get_value(f.name), 15)  | F.NA}
+      <br>
+    % endfor
     <strong>${_('cm_info_phase')}:</strong> ${ case.getState().getPhaseDescription() | F.NA}<br>
     <strong>${_('cm_info_status')}:</strong>
        ${case.getState().getStateLabel()  | F.NA}<br>
-    <strong>${_('cm_info_nr')}:</strong> ${case.knr | F.NA}
   </div>
 </%def>
 
@@ -131,7 +130,7 @@
       <ul>
         <li><a href="${h.url_for(controller='/case_overview')}" onclick="return checkModification();"> ${_('cm_menu_link_backtooverview')}</a></li>
         <li><a href="/case/printAll/${session.get('case').id}/0" onclick="return checkModification();" target="_blank"> ${_('cm_menu_link_print')}</a></li>
-        % if h.hasRole(['cm_ka']):
+        % if h.hasRole(['cm_ka']) and g.mpuls_config.is_enabled('case-module', 'reminders'):
           <li><a href="/caseappointment/newReminder/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_menu_link_create_reminder')}</a></li>
         % endif
       </ul>



More information about the Mpuls-commits mailing list