[Mpuls-commits] r3387 - base/trunk/mpulsweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Aug 12 17:39:12 CEST 2010


Author: torsten
Date: 2010-08-12 17:39:12 +0200 (Thu, 12 Aug 2010)
New Revision: 3387

Modified:
   base/trunk/mpulsweb/templates/casemanagement/digest_body.mako
Log:
* mpulsweb/templates/casemanagement/digest_body.mako: Added more
	information on case current state of the case.



Modified: base/trunk/mpulsweb/templates/casemanagement/digest_body.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/digest_body.mako	2010-08-12 15:37:40 UTC (rev 3386)
+++ base/trunk/mpulsweb/templates/casemanagement/digest_body.mako	2010-08-12 15:39:12 UTC (rev 3387)
@@ -56,12 +56,19 @@
 
 <h2>${_('Information on case')}</h2>
 <table>
-  <tr class="">
+  <% casetype = g.mpuls_config.get('phases', 'casetype')[0].get(str(c.case.getState().getPhase())) %>
+  % if casetype is not None:
+    <tr class="">
+      <td class="label">${_('Casetype')}</td>
+      <td>${casetype}
+    </tr>
+  % endif
+  <tr class="hl">
     <td class="label">${_('Phase')}</td>
     <td>${c.case.getState().getPhaseDescription()}</td>
   </tr>
   % if g.mpuls_config.is_enabled('case-module', 'tags'):
-  <tr class="hl">
+  <tr class="">
     <td class="label">${_('Validity')}</td>
     <td>
       % for validity in g.mpuls_config.get('validities', 'enabled'):
@@ -71,6 +78,30 @@
       % endfor
     </td>
   </tr>
+  <tr class="hl">
+    <td class="label">${_('Start and Enddates')}</td>
+    <td>
+      % if c.case.getState().getPhase() != -1:
+        <ul>
+        <% reachable = c.case.get_phaseslist().get_path(
+                       str(c.case.getState().getPhase()),only_reachable=False) 
+        %>
+        % for phase in c.case.get_phaseslist():
+          %  if phase.getStart().id in reachable or phase.getEnd().id in reachable:
+            <li>
+              ${phase.description}: 
+              (${h.format_date(phase.getStart().date) | F.NA} 
+              ${_('until')} 
+              ${h.format_date(phase.getEnd().date) | F.NA})
+            </li>
+          % endif
+        % endfor
+        </ul>
+      % else:
+        ${_('unknown')} 
+      % endif
+    </td>
+  </tr>
   % endif
 </table>
 



More information about the Mpuls-commits mailing list