[Mpuls-commits] r2100 - wasko/branches/2.0/jmdweb/templates/evaluation

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 24 12:52:22 CET 2010


Author: torsten
Date: 2010-03-24 12:52:22 +0100 (Wed, 24 Mar 2010)
New Revision: 2100

Modified:
   wasko/branches/2.0/jmdweb/templates/evaluation/evaluate.mako
   wasko/branches/2.0/jmdweb/templates/evaluation/evaluate_adele.mako
   wasko/branches/2.0/jmdweb/templates/evaluation/result.mako
Log:
* jmdweb/templates/evaluation/evaluate.mako, 
  jmdweb/templates/evaluation/evaluate_adele.mako: Render phases based
  on config. Removed type of ending.
* jmdweb/templates/evaluation/result.mako: Do not escape eval results.



Modified: wasko/branches/2.0/jmdweb/templates/evaluation/evaluate.mako
===================================================================
--- wasko/branches/2.0/jmdweb/templates/evaluation/evaluate.mako	2010-03-24 11:49:30 UTC (rev 2099)
+++ wasko/branches/2.0/jmdweb/templates/evaluation/evaluate.mako	2010-03-24 11:52:22 UTC (rev 2100)
@@ -28,11 +28,16 @@
   <tr>
     <td class="label">Phase</td>
     <td>
-      <input type="checkbox" value="-1" name="phase"/> Unbekannt<br/>
-      <input type="checkbox" checked="checked" value="0" name="phase"/> Eingangsanamnese<br/>
-      <input type="checkbox" checked="checked" value="2" name="phase"/> Case Management<br/>
-      <input type="checkbox" checked="checked" value="4" name="phase"/> Nachbetreuung<br/>
-      <input type="checkbox" checked="checked" value="6" name="phase"/> Beratung<br/>
+      <input type="checkbox" name="phase" id="phase_x" value="-1"> 
+      <label for="phase_x">
+        ${_('Unknown')}<br>
+      </label>
+      % for n,p in enumerate(g.mpuls_config.get('phases', 'phases')):
+        <input type="checkbox" name="phase" id="phase_${n}" value="${p}"> 
+          <label for="phase_${n}">
+            ${g.mpuls_config.get('phases', 'description')[0].get(p)}<br>
+          </label>
+      % endfor
     </td>
   </tr>
   <tr>
@@ -47,14 +52,6 @@
       <input type="text" name="end_date" class="datefield"><form:error name="end_date" format="">
     </td>
   </tr>
-  <tr>
-    <td class="label">Art der Beendigung</td>
-    <td>
-      <input type="checkbox" value="0" name="type_ending"/> erfolgreiche Reintegration in die Schule<br/>
-      <input type="checkbox" value="2" name="type_ending"/> sonstige Beendigung<br/> 
-      <input type="checkbox" value="1" name="type_ending"/> Abbruch<br/>
-    </td>
-  </tr>
   % if session.has_key('evaluation.options'):
   <tr>
     <td class="label">${_('Filter')}</td>

Modified: wasko/branches/2.0/jmdweb/templates/evaluation/evaluate_adele.mako
===================================================================
--- wasko/branches/2.0/jmdweb/templates/evaluation/evaluate_adele.mako	2010-03-24 11:49:30 UTC (rev 2099)
+++ wasko/branches/2.0/jmdweb/templates/evaluation/evaluate_adele.mako	2010-03-24 11:52:22 UTC (rev 2100)
@@ -27,36 +27,30 @@
   <tr>
     <td class="label">Phase</td>
     <td>
-      <input type="hidden" name="phase" value="2">
-      <input type="checkbox" value="-1" name="phase" disabled="disabled"/> Unbekannt<br/>
-      <input type="checkbox" value="0"  name="phase" disabled="disabled"/> Eingangsanamnese<br/>
-      <input type="checkbox" value="2"  name="phase" disabled="disabled"/> Case Management<br/>
-      <input type="checkbox" value="4"  name="phase" disabled="disabled"/> Nachbetreuung<br/>
-      <input type="checkbox" value="6"  name="phase" disabled="disabled"/> Beratung<br/>
+      <input type="checkbox" name="phase" id="phase_x" value="-1" disabled="disabled"> 
+      <label for="phase_x">
+        ${_('Unknown')}<br>
+      </label>
+      % for n,p in enumerate(g.mpuls_config.get('phases', 'phases')):
+        <input type="checkbox" name="phase" id="phase_${n}" value="${p}" disabled="disabled"> 
+          <label for="phase_${n}">
+            ${g.mpuls_config.get('phases', 'description')[0].get(p)}<br>
+          </label>
+      % endfor
     </td>
   </tr>
   <tr>
     <td class="label">Start</td>
     <td>
-      <input type="hidden" name="start_date">
       <input type="text" name="start_date" class="datefield" disabled="disabled"><form:error name="start_date" format="">
     </td>
   </tr>
   <tr>
     <td class="label">Ende</td>
     <td>
-      <input type="hidden" name="end_date">
       <input type="text" name="end_date" class="datefield" disabled="disabled"><form:error name="end_date" format="">
     </td>
   </tr>
-  <tr>
-    <td class="label">Art der Beendigung</td>
-    <td>
-      <input type="checkbox" value="0" name="type_ending" disabled="disabled"/> erfolgreiche Reintegration in die Schule<br/>
-      <input type="checkbox" value="2" name="type_ending" disabled="disabled"/> sonstige Beendigung<br/> 
-      <input type="checkbox" value="1" name="type_ending" disabled="disabled"/> Abbruch<br/>
-    </td>
-  </tr>
   % if session.has_key('evaluation.options'):
   <tr>
     <td class="label">${_('Filter')}</td>

Modified: wasko/branches/2.0/jmdweb/templates/evaluation/result.mako
===================================================================
--- wasko/branches/2.0/jmdweb/templates/evaluation/result.mako	2010-03-24 11:49:30 UTC (rev 2099)
+++ wasko/branches/2.0/jmdweb/templates/evaluation/result.mako	2010-03-24 11:52:22 UTC (rev 2100)
@@ -23,6 +23,6 @@
       </div>
     </div>
     </div>
-    ${c.result}
+    ${h.literal(c.result)}
   </body>
 </html>



More information about the Mpuls-commits mailing list