[Mpuls-commits] r195 - in waska/trunk: . waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Sep 25 12:36:39 CEST 2008


Author: teichmann
Date: 2008-09-25 12:36:38 +0200 (Thu, 25 Sep 2008)
New Revision: 195

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/waskaweb/controllers/agency_overview.py
Log:
Fixed issue574


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2008-09-25 10:02:31 UTC (rev 194)
+++ waska/trunk/ChangeLog.txt	2008-09-25 10:36:38 UTC (rev 195)
@@ -1,5 +1,14 @@
 2008-09-25	Sascha L. Teichmann <sascha.teichmann at intevation.de>
 
+	Fixed issue 574
+
+	* waskaweb/controllers/agency_overview.py:  Rewired link paths. They are
+	  not equal to the ones in case overview! TODO: This should be harmonized.
+	  Data on evaluation server is alway anonymized so there is no need to do
+	  it again.
+
+2008-09-25	Sascha L. Teichmann <sascha.teichmann at intevation.de>
+
 	Fixed issue575
 
 	* waskaweb/controllers/agency_overview.py: Rewired link paths. They are

Modified: waska/trunk/waskaweb/controllers/agency_overview.py
===================================================================
--- waska/trunk/waskaweb/controllers/agency_overview.py	2008-09-25 10:02:31 UTC (rev 194)
+++ waska/trunk/waskaweb/controllers/agency_overview.py	2008-09-25 10:36:38 UTC (rev 195)
@@ -280,7 +280,7 @@
             return selectCSVParts()
         return self.downloadCSV()
 
-    @checkRole(('pb_ka'))
+    @checkRole(('pb_ka',))
     def downloadXML(self):
         c.success_for        = EXPORT_SUCCESS_XML
         c.success_text       = EXPORT_SUCCESS_XML_EXPLAINATION
@@ -300,10 +300,12 @@
             session.save()
         return selection_checker
 
-    @checkRole(('pb_ka'))
+    @checkRole(('pb_ka',))
     def selectXMLParts(self):
         selection_checker  = self.__getSelectionChecker()
         c.selection_question = SELECT_PARTS_FOR_EXPORT
+        c.back_title         = "XML Export"
+        c.back_url           = h.url_for(controller='/agency_overview', action='downloadXML', confirmed=1)
         c.store_action       = h.url_for(action="storeSelectedXMLParts")
         page = render('casemanagement/selectParts.mako')
         return formencode.htmlfill.render(unicode(page, 'utf-8'),defaults=selection_checker.selections)
@@ -312,7 +314,7 @@
         #c.store_action       = h.url_for(action="storeSelectedXMLParts")
         #return render('casemanagement/selectParts.mako')
 
-    @checkRole(('pb_ka'))
+    @checkRole(('pb_ka',))
     def storeSelectedXMLParts(self):
         validator = CasePartSelectionForm()
         selection_checker = self.__getSelectionChecker()
@@ -334,8 +336,10 @@
         #session.save()
         #return self.downloadXML()
 
-    @checkRole(('pb_ka'))
+    @checkRole(('pb_ka',))
     def downloadXLS(self):
+        c.success_for     = EXPORT_SUCCESS_XLS
+        c.success_text    = EXPORT_SUCCESS_XLS_EXPLAINATION
         selection_checker = self.__getSelectionChecker()
         c.is_all_selected = selection_checker.isAllSelected()
         c.selection_link = h.url_for(action="selectXLSParts")
@@ -343,17 +347,17 @@
         c.overview_link  = h.url_for(action="overview")
         return render('casemanagement/downloadXLS.mako')
 
-    @checkRole('pb_ka')
+    @checkRole(('pb_ka',))
     def selectXLSParts(self):
         selection_checker  = self.__getSelectionChecker()
         c.selection_question = SELECT_PARTS_FOR_EXPORT
         c.store_action       = h.url_for(action="storeSelectedXLSParts")
-        c.back_url           = h.url_for(controller='/case_overview', action='exportXLS', confirmed=1)
+        c.back_url           = h.url_for(controller='/case_overview', action='downloadXLS', confirmed=1)
         c.back_title         = "XLS Export"
         page = render('casemanagement/selectParts.mako')
         return formencode.htmlfill.render(unicode(page, 'utf-8'),defaults=selection_checker.selections)
 
-    @checkRole('pb_ka')
+    @checkRole(('pb_ka',))
     def storeSelectedXLSParts(self):
         validator = CasePartSelectionForm()
         selection_checker = self.__getSelectionChecker()
@@ -365,7 +369,7 @@
             session.save()
         except formencode.Invalid, error:
             return selectXLSParts()
-        return self.exportXLS(1)
+        return self.downloadXLS()
 
     @checkRole(('pb_ka'))
     def downloadCSVAction(self):
@@ -411,7 +415,7 @@
         except:
             return render('/tests/trace.mako')
 
-    @checkRole(('pb_ka'))
+    @checkRole(('pb_ka',))
     def downloadXLSAction(self):
         agency_bundle = session.get('agencybundle')
         case_ids = []
@@ -421,7 +425,7 @@
             if case_ids:
                 case_bundle = CaseBundle(case_ids)
                 selection_checker = self.__getSelectionChecker()
-                xls = case_bundle.exportAsXLS(selection_checker, anonymize)
+                xls = case_bundle.exportAsXLS(selection_checker)
                 data = paste.fileapp.DataApp(
                     xls,
                     content_type        = 'application/msexcel',



More information about the Mpuls-commits mailing list