[Mpuls-commits] r4195 - in waska/trunk: . waskaweb/controllers waskaweb/templates waskaweb/templates/evaluation
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Nov 16 13:12:45 CET 2010
Author: bh
Date: 2010-11-16 13:12:45 +0100 (Tue, 16 Nov 2010)
New Revision: 4195
Added:
waska/trunk/waskaweb/controllers/evaluate.py
waska/trunk/waskaweb/templates/evaluation/
waska/trunk/waskaweb/templates/evaluation/evaluate_extra.mako
Modified:
waska/trunk/ChangeLog
Log:
Implement the WASKA part of mpuls/issue1264
* waskaweb/controllers/evaluate.py: New. Extend
EvaluateController so that the type_ending_clause can be
implemented for WASKA
* waskaweb/templates/evaluation/evaluate_extra.mako: New.
Checkboxes for the type ending search for evaluations.
Modified: waska/trunk/ChangeLog
===================================================================
--- waska/trunk/ChangeLog 2010-11-16 11:33:09 UTC (rev 4194)
+++ waska/trunk/ChangeLog 2010-11-16 12:12:45 UTC (rev 4195)
@@ -1,3 +1,14 @@
+2010-11-16 Bernhard Herzog <bh at intevation.de>
+
+ Implement the WASKA part of mpuls/issue1264
+
+ * waskaweb/controllers/evaluate.py: New. Extend
+ EvaluateController so that the type_ending_clause can be
+ implemented for WASKA
+
+ * waskaweb/templates/evaluation/evaluate_extra.mako: New.
+ Checkboxes for the type ending search for evaluations.
+
2010-11-15 Bernhard Herzog <bh at intevation.de>
* waskaweb/public/formed/formedtree.xml: Set version number.
Added: waska/trunk/waskaweb/controllers/evaluate.py
===================================================================
--- waska/trunk/waskaweb/controllers/evaluate.py 2010-11-16 11:33:09 UTC (rev 4194)
+++ waska/trunk/waskaweb/controllers/evaluate.py 2010-11-16 12:12:45 UTC (rev 4195)
@@ -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.beendigung_5, now())"
+ " AND coalesce(m.beendigung_5, now()) <= '%s'::date"
+ " AND m.art_beendigung in (%s))"
+ % (params['start_date'], params['end_date'],
+ ", ".join([str(e) for e in params['type_ending']])))
+ else:
+ return "TRUE"
Property changes on: waska/trunk/waskaweb/controllers/evaluate.py
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
Added: waska/trunk/waskaweb/templates/evaluation/evaluate_extra.mako
===================================================================
--- waska/trunk/waskaweb/templates/evaluation/evaluate_extra.mako 2010-11-16 11:33:09 UTC (rev 4194)
+++ waska/trunk/waskaweb/templates/evaluation/evaluate_extra.mako 2010-11-16 12:12:45 UTC (rev 4195)
@@ -0,0 +1,22 @@
+<!-- -*- coding: utf-8 -*- -->
+<%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="2" id="type_ending_2" name="type_ending"
+ ${adele_disabled} />
+ <label for="type_ending_2">Vorzeitige Beendigung</label><br/>
+ <input type="checkbox" value="0" id="type_ending_0" name="type_ending"
+ ${adele_disabled} />
+ <label for="type_ending_0">Reguläre Beendigung</label><br/>
+ <input type="checkbox" value="1" id="type_ending_1" name="type_ending"
+ ${adele_disabled} />
+ <label for="type_ending_1">Abbruch</label><br/>
+ </td>
+</tr>
More information about the Mpuls-commits
mailing list