[Mpuls-commits] r2767 - in base/trunk: . mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed May 26 16:34:03 CEST 2010
Author: bh
Date: 2010-05-26 16:34:02 +0200 (Wed, 26 May 2010)
New Revision: 2767
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/controllers/case_bundle.py
Log:
* mpulsweb/controllers/case_bundle.py
(CaseBundleController._empty_caselist)
(CaseBundleController.no_action)
(CaseBundleController.markDelete, CaseBundleController.delete)
(CaseBundleController.delete)
(CaseBundleController.markAnonymize)
(CaseBundleController.anonymize, CaseBundleController.restore)
(CaseBundleController.set_editor)
(CaseBundleController.set_standin): Use h.url_for consistently for
all-intra application URLs.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2010-05-26 14:25:40 UTC (rev 2766)
+++ base/trunk/ChangeLog 2010-05-26 14:34:02 UTC (rev 2767)
@@ -1,5 +1,18 @@
2010-05-26 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/controllers/case_bundle.py
+ (CaseBundleController._empty_caselist)
+ (CaseBundleController.no_action)
+ (CaseBundleController.markDelete, CaseBundleController.delete)
+ (CaseBundleController.delete)
+ (CaseBundleController.markAnonymize)
+ (CaseBundleController.anonymize, CaseBundleController.restore)
+ (CaseBundleController.set_editor)
+ (CaseBundleController.set_standin): Use h.url_for consistently for
+ all-intra application URLs.
+
+2010-05-26 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/controllers/caseappointment.py
(CaseappointmentController.delete): Use h.url_for consistently for
all-intra application URLs.
Modified: base/trunk/mpulsweb/controllers/case_bundle.py
===================================================================
--- base/trunk/mpulsweb/controllers/case_bundle.py 2010-05-26 14:25:40 UTC (rev 2766)
+++ base/trunk/mpulsweb/controllers/case_bundle.py 2010-05-26 14:34:02 UTC (rev 2767)
@@ -11,6 +11,7 @@
from formed.meta.data import PageNode
from mpulsweb.lib.base import c, render, request, session, BaseController
+from mpulsweb.lib.helpers import url_for
from mpulsweb.lib.security import checkRole
from mpulsweb.lib.validators import BundleActionForm, SetBundleEditorForm, \
SetBundleStandinForm, ExportSelectorValidator
@@ -248,7 +249,7 @@
return case_bundle
def _empty_caselist(self):
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
c.dialog_title = BUNDLE_NOTIFICATION_EMPTYLIST_HEADER
c.dialog_text = BUNDLE_NOTIFICATION_EMPTYLIST
return render('/casebundle/dialogs/error.mako')
@@ -259,7 +260,7 @@
def no_action(self):
c.dialog_title= BUNDLE_NOTIFICATION_NOACTION_HEADER
c.dialog_text = BUNDLE_NOTIFICATION_NOACTION
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
return render('/casebundle/dialogs/error.mako')
# DELETE
@@ -278,7 +279,7 @@
num) + " " + OK_TO_CONTINUE
c.dialog_title = MARKDELETE_SUCCESS_HEADER
c.dialog_text = MARKDELETE_SUCCESS_TEXT % str(num)
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
del session['casebundle']
return render ('/casebundle/dialogs/success_markdelete.mako')
else:
@@ -292,8 +293,9 @@
c.dialog_title = DIALOG_CONFIRM_DELETE
c.dialog_text = (DIALOG_CONFIRM_EXPLAINATION
% "\n".join(self._buildCaseList(case_bundle)))
- c.url_yes = "/case_bundle/markDelete/1"
- c.url_no = "/case_overview/"
+ c.url_yes = url_for(controller='/case_bundle', action='markDelete',
+ confirmed=1)
+ c.url_no = url_for(controller='/case_overview')
return render('/casemanagement/dialogs/confirm.mako')
@checkRole(('admin'))
@@ -313,7 +315,7 @@
c.dialog_title = DELETE_SUCCESS_HEADER
c.dialog_text = DELETE_SUCCESS_TEXT % str(num)
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
del session['casebundle']
return render('/casebundle/dialogs/success_delete_admin.mako')
else:
@@ -326,8 +328,9 @@
c.dialog_title = DIALOG_CONFIRM_DELETE
c.dialog_text = (DIALOG_CONFIRM_EXPLAINATION
% "\n".join(self._buildCaseList(case_bundle)))
- c.url_yes = "/case_bundle/delete/1"
- c.url_no = "/case_overview/"
+ c.url_yes = url_for(controller='/case_bundle', action='delete',
+ confirmed=1)
+ c.url_no = url_for(controller='/case_overview')
return render('/casemanagement/dialogs/confirm.mako')
# ANONYMIZE
@@ -348,7 +351,7 @@
c.success_for = MARKANONYMIZE_SUCCESS_HEADER
c.success_text = MARKANONYMIZE_SUCCESS_TEXT % str(num)
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
del session['casebundle']
return render ('/casebundle/dialogs/success_anonymize.mako')
else:
@@ -368,8 +371,9 @@
c.dialog_title = DIALOG_CONFIRM_MARKANONYMIZE
c.dialog_text = (DIALOG_CONFIRM_MARKANONYMIZE_EXPLAINATION
% "\n".join(self._buildCaseList(case_bundle)))
- c.url_yes = "/case_bundle/markAnonymize/1"
- c.url_no = "/case_overview/"
+ c.url_yes = url_for(controller='/case_bundle',
+ action='markAnonymize', confirmed=1)
+ c.url_no = url_for(controller='/case_overview')
return render('/casebundle/dialogs/confirm_anonymize.mako')
@checkRole(('admin'))
@@ -389,7 +393,7 @@
c.dialog_text = ANONYMIZE_SUCCESS_TEXT % str(num)
c.dialog_title = ANONYMIZE_SUCCESS_HEADER
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
del session['casebundle']
return render ('/casebundle/dialogs/success_anonymize.mako')
else:
@@ -407,8 +411,9 @@
c.dialog_title = DIALOG_CONFIRM_ANONYMIZE
c.dialog_text = (DIALOG_CONFIRM_ANONYMIZE_EXPLAINATION
% "\n".join(self._buildCaseList(case_bundle)))
- c.url_yes = "/case_bundle/anonymize/1"
- c.url_no = "/case_overview/"
+ c.url_yes = url_for(controller='/case_bundle', action='anonymize',
+ confirmed=1)
+ c.url_no = url_for(controller='/case_overview')
return render('/casebundle/dialogs/confirm_anonymize.mako')
# RESTORE
@@ -427,7 +432,7 @@
num) + " " + OK_TO_CONTINUE
c.dialog_title = RESTORE_SUCCESS_HEADER
c.dialog_text = RESTORE_SUCCESS_TEXT % str(num)
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
del session['casebundle']
return render ('/casemanagement/dialogs/success_restore.mako')
else:
@@ -441,8 +446,9 @@
c.dialog_title = DIALOG_CONFIRM_RESTORE
c.dialog_text = (DIALOG_CONFIRM_RESTORE_EXPLAINATION
% "\n".join(self._buildCaseList(case_bundle)))
- c.url_yes = "/case_bundle/restore/1"
- c.url_no = "/case_overview/"
+ c.url_yes = url_for(controller='/case_bundle', action='restore',
+ confirmed=1)
+ c.url_no = url_for(controller='/case_overview')
return render('/casemanagement/dialogs/confirm_restore.mako')
# ORGANISATION
@@ -461,7 +467,7 @@
num) + " " + OK_TO_CONTINUE
c.dialog_text= (TRANSFER_SUCCESS_TEXT
% (str(num), user.first_name, user.last_name))
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
del session['casebundle']
return render('/casebundle/dialogs/success_editor.mako')
except formencode.Invalid, error:
@@ -482,7 +488,7 @@
u"%s cases were sucessfully assigend to a substitute.",
num) + " " + OK_TO_CONTINUE
c.dialog_text = STANDIN_SUCCESS_TEXT % str(num)
- c.url_ok = "/case_overview"
+ c.url_ok = url_for(controller='/case_overview')
del session['casebundle']
return render('/casebundle/dialogs/success_standin.mako')
except formencode.Invalid, error:
More information about the Mpuls-commits
mailing list