[Mpuls-commits] r729 - in waska/trunk/waskaweb: controllers templates/evaluation

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Dec 7 11:21:16 CET 2009


Author: torsten
Date: 2009-12-07 11:21:15 +0100 (Mon, 07 Dec 2009)
New Revision: 729

Modified:
   waska/trunk/waskaweb/controllers/evaluate.py
   waska/trunk/waskaweb/templates/evaluation/evaluate.mako
   waska/trunk/waskaweb/templates/evaluation/evaluate_adele.mako
Log:
Implemented reset function for case preselection in evaluation


Modified: waska/trunk/waskaweb/controllers/evaluate.py
===================================================================
--- waska/trunk/waskaweb/controllers/evaluate.py	2009-12-07 09:38:35 UTC (rev 728)
+++ waska/trunk/waskaweb/controllers/evaluate.py	2009-12-07 10:21:15 UTC (rev 729)
@@ -77,8 +77,15 @@
     def index(self):
         return self.evaluate()
 
+    def resetFilter(self, id):
+        if session.has_key('caseoverview_search'):
+            del session['caseoverview_search']
+            session.save()
+        return self.evaluate(id)
+
     def evaluate(self, id=None):
         conn, cur = None, None
+        c.eval_id = id
         try:
             try:
                 config_file = get_configfile(id)

Modified: waska/trunk/waskaweb/templates/evaluation/evaluate.mako
===================================================================
--- waska/trunk/waskaweb/templates/evaluation/evaluate.mako	2009-12-07 09:38:35 UTC (rev 728)
+++ waska/trunk/waskaweb/templates/evaluation/evaluate.mako	2009-12-07 10:21:15 UTC (rev 729)
@@ -59,9 +59,8 @@
   <tr>
     <td class="label">${_('Filter')}</td>
     <td>
-      Yes (<a href="/evaluate/resetFilter/${c.evalconfig.get_setid()}">Reset</a>)<br>
+      Es besteht eine Vorauswahl von Fallkten aus der Fallaktenübersicht (<a href="/evaluate/resetFilter/${c.evaloptions.get('id')}">Löschen</a>)<br>
       <input type="hidden" name="sqlwhere">
-      ${session['caseoverview_search']}
     </td>
   </tr>
   % endif

Modified: waska/trunk/waskaweb/templates/evaluation/evaluate_adele.mako
===================================================================
--- waska/trunk/waskaweb/templates/evaluation/evaluate_adele.mako	2009-12-07 09:38:35 UTC (rev 728)
+++ waska/trunk/waskaweb/templates/evaluation/evaluate_adele.mako	2009-12-07 10:21:15 UTC (rev 729)
@@ -57,12 +57,12 @@
       <input type="checkbox" value="1" name="type_ending" disabled="disabled"/> Abbruch<br/>
     </td>
   </tr>
-  % if session.has_key('evaluation.options'):
+  % if session.has_key('caseoverview_search'):
   <tr>
     <td class="label">${_('Filter')}</td>
     <td>
-      Yes (<a href="/evaluate/resetFilter/${c.evalconfig.get_setid()}">Reset</a>)<br>
-      ${session['evaluation.options'].get('sql')}
+      Es besteht eine Vorauswahl von Fallkten aus der Fallaktenübersicht (<a href="/evaluate/resetFilter/${c.evaloptions.get('id')}">Löschen</a>)<br>
+      <input type="hidden" name="sqlwhere">
     </td>
   </tr>
   % endif



More information about the Mpuls-commits mailing list