[Mpuls-commits] r1205 - wasko/branches/2.0/waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Feb 3 10:55:00 CET 2010
Author: torsten
Date: 2010-02-03 10:54:57 +0100 (Wed, 03 Feb 2010)
New Revision: 1205
Modified:
wasko/branches/2.0/waskaweb/controllers/case_overview.py
Log:
* waskaweb/controllers/case_overview.py (get_sort): New. Get
sortfields from GET params.
(CaseOverviewController.overview_extended): Call overview with no
params (CaseOverviewController.overview_extended): Remove reset and
sort params from function. They are now submitted as GET request
Modified: wasko/branches/2.0/waskaweb/controllers/case_overview.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/case_overview.py 2010-02-03 09:49:48 UTC (rev 1204)
+++ wasko/branches/2.0/waskaweb/controllers/case_overview.py 2010-02-03 09:54:57 UTC (rev 1205)
@@ -268,7 +268,12 @@
return search_options
+def get_sort(params):
+ sort = params.get('sort_field', 'id')
+ order = params.get('sort_order', 'asc')
+ return sort, order
+
class CaseOverviewController(CasebaseController):
def __before__(self):
@@ -287,11 +292,12 @@
extended = True
session['EXTENDED_SEARCH'] = extended
session.save()
- return self.overview(0, 'name', 'asc')
+ return self.overview()
@checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- def overview(self, reset=0, sort_field="name", sort_order="asc"):
- reset = self._checkBool(reset)
+ def overview(self):
+ reset = self._checkBool(request.params.get('reset', '0'))
+ sort_field, sort_order = get_sort(request.params)
if reset:
session['CASE_OVERVIEW_SEARCHOPTIONS'] = {}
session['CASE_OVERVIEW_SELECTION'] = {}
More information about the Mpuls-commits
mailing list