[Mpuls-commits] r4194 - in wasko/trunk: . waskoweb/controllers waskoweb/templates waskoweb/templates/evaluation

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 16 12:33:09 CET 2010


Author: bh
Date: 2010-11-16 12:33:09 +0100 (Tue, 16 Nov 2010)
New Revision: 4194

Added:
   wasko/trunk/waskoweb/controllers/evaluate.py
   wasko/trunk/waskoweb/templates/evaluation/
   wasko/trunk/waskoweb/templates/evaluation/evaluate_extra.mako
Modified:
   wasko/trunk/ChangeLog
Log:
Implement the WASKO part of mpuls/issue1264

* waskoweb/controllers/evaluate.py: New.  Implement
EvaluateController so that the type_ending_clause can be
implemented for WASKO

* waskoweb/templates/evaluation/evaluate_extra.mako: New.
Checkboxes for the type ending search for evaluations.


Modified: wasko/trunk/ChangeLog
===================================================================
--- wasko/trunk/ChangeLog	2010-11-16 11:24:53 UTC (rev 4193)
+++ wasko/trunk/ChangeLog	2010-11-16 11:33:09 UTC (rev 4194)
@@ -1,3 +1,14 @@
+2010-11-16  Bernhard Herzog  <bh at intevation.de>
+
+	Implement the WASKO part of mpuls/issue1264
+
+	* waskoweb/controllers/evaluate.py: New.  Implement
+	EvaluateController so that the type_ending_clause can be
+	implemented for WASKO
+
+	* waskoweb/templates/evaluation/evaluate_extra.mako: New.
+	Checkboxes for the type ending search for evaluations.
+
 2010-11-15  Bernhard Herzog  <bh at intevation.de>
 
 	* waskoweb/public/formed/formedtree.xml: Set version number.

Added: wasko/trunk/waskoweb/controllers/evaluate.py
===================================================================
--- wasko/trunk/waskoweb/controllers/evaluate.py	2010-11-16 11:24:53 UTC (rev 4193)
+++ wasko/trunk/waskoweb/controllers/evaluate.py	2010-11-16 11:33:09 UTC (rev 4194)
@@ -0,0 +1,15 @@
+from mpulsweb.controllers.evaluate import \
+     EvaluateController as MpulsEvaluateController
+
+class EvaluateController(MpulsEvaluateController):
+
+    def type_ending_clause(self, params):
+        if (params['type_ending'] and params.get('start_date') != 'None'
+            and params.get('end_date') != 'None'):
+            return ("('%s'::date <= coalesce(m.datum_cm_ende, now())"
+                    " AND coalesce(m.datum_cm_ende, now()) <= '%s'::date"
+                    " AND m.cm_end_art in (%s))"
+                    % (params['start_date'], params['end_date'],
+                    ", ".join([str(e) for e in params['type_ending']])))
+        else:
+            return "TRUE"


Property changes on: wasko/trunk/waskoweb/controllers/evaluate.py
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Added: wasko/trunk/waskoweb/templates/evaluation/evaluate_extra.mako
===================================================================
--- wasko/trunk/waskoweb/templates/evaluation/evaluate_extra.mako	2010-11-16 11:24:53 UTC (rev 4193)
+++ wasko/trunk/waskoweb/templates/evaluation/evaluate_extra.mako	2010-11-16 11:33:09 UTC (rev 4194)
@@ -0,0 +1,21 @@
+<%page args="adele_disabled"/>
+<tr>
+  <td class="label">Art der Beendigung</td>
+  <td>
+    <input type="checkbox" value="-1" id="type_ending_-1" name="type_ending"
+           ${adele_disabled} />
+    <label for="type_ending_-1">Keine Angabe</label><br/>
+    <input type="checkbox" value="-3" id="type_ending_-3" name="type_ending"
+           ${adele_disabled} />
+    <label for="type_ending_-3">Unbekannt</label><br/>
+    <input type="checkbox" value="1" id="type_ending_1" name="type_ending"
+           ${adele_disabled} />
+    <label for="type_ending_1">Erfolgreiche Reintegration in die Schule</label><br/>
+    <input type="checkbox" value="2" id="type_ending_2" name="type_ending"
+           ${adele_disabled} />
+    <label for="type_ending_2">Sonstige Beendigung</label><br/> 
+    <input type="checkbox" value="3" id="type_ending_3" name="type_ending"
+           ${adele_disabled} />
+    <label for="type_ending_3">Abbruch</label><br/>
+  </td>
+</tr>



More information about the Mpuls-commits mailing list