[Mpuls-commits] r5886 - base/trunk/mpulsweb/controllers
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Thu Mar 8 14:31:18 CET 2012
Author: ludwig
Date: 2012-03-08 14:31:18 +0100 (Thu, 08 Mar 2012)
New Revision: 5886
Modified:
base/trunk/mpulsweb/controllers/appointment.py
base/trunk/mpulsweb/controllers/case.py
base/trunk/mpulsweb/controllers/document.py
base/trunk/mpulsweb/controllers/news.py
Log:
Issue 2738 Bugfix: Remove leading / from url calls, add index.
Modified: base/trunk/mpulsweb/controllers/appointment.py
===================================================================
--- base/trunk/mpulsweb/controllers/appointment.py 2012-03-08 13:06:04 UTC (rev 5885)
+++ base/trunk/mpulsweb/controllers/appointment.py 2012-03-08 13:31:18 UTC (rev 5886)
@@ -51,7 +51,7 @@
@checkRole(('admin', 'cm', 'pt_dlr'))
def index(self):
- redirect(url(action='overview'))
+ redirect(url(action='overview', action='index'))
@checkRole(('admin', 'cm', 'pt_dlr'))
def overview(self):
Modified: base/trunk/mpulsweb/controllers/case.py
===================================================================
--- base/trunk/mpulsweb/controllers/case.py 2012-03-08 13:06:04 UTC (rev 5885)
+++ base/trunk/mpulsweb/controllers/case.py 2012-03-08 13:31:18 UTC (rev 5886)
@@ -118,9 +118,9 @@
" for deletion.<br>") \
% "\n".join(build_case_list([case]))
- c.url_yes = h.url(controller='/case', action='markForDelete',
+ c.url_yes = h.url(controller='case', action='markForDelete',
id=id, confirmed=1)
- c.url_no = h.url(controller='/case_overview', action='index')
+ c.url_no = h.url(controller='case_overview', action='index')
return render('/casemanagement/dialogs/confirm.mako')
@checkRole('admin')
@@ -139,9 +139,9 @@
"<br><br>Do you want to delete the case "
"from the server?%s<br>") \
% "\n".join(build_case_list([case]))
- c.url_yes = h.url(controller='/case', action='delete',
+ c.url_yes = h.url(controller='case', action='delete',
id=id, confirmed=1)
- c.url_no = h.url(controller='/case_overview')
+ c.url_no = h.url(controller='case_overview')
return render('/casemanagement/dialogs/confirm_delete.mako')
try:
@@ -188,7 +188,7 @@
@checkRole('cm')
def markForAnonymize(self, id, confirmed):
check_feature('case-module', 'anonymize')
- url = h.url(controller='/case', action='digest', id=id)
+ url = h.url(controller='case', action='digest', id=id)
return self._markForAnonymize(id, confirmed, url)
def _markForAnonymize(self, id, confirmed, url):
@@ -231,7 +231,7 @@
u" anonymised in phase </b>%s<b>!</b><br>""") \
% ("\n".join(build_case_list([case])),
" ".join(phase_name)))
- c.url_yes = h.url(controller='/case', action='markForAnonymize',
+ c.url_yes = h.url(controller='case', action='markForAnonymize',
id=id, confirmed=1)
c.url_no = url
return render('/casemanagement/dialogs/confirm_markanonymize.mako')
@@ -357,7 +357,7 @@
u"<p><i>%s</i></p>"
u"<p>Please click on OK to geht back to the"
u" overview.</p>""") % "<br>".join(errors)
- c.url_ok = h.url(controller='/case', action='select',
+ c.url_ok = h.url(controller='case', action='select',
id=case.id, confirmed=1)
return render('/casemanagement/dialogs/failed_markanonymize.mako')
@@ -375,7 +375,7 @@
except ConsistenceCheckException, e:
c.dialog_title = _(u"Anonymising not possible.")
c.dialog_text = h.literal(e.value)
- c.url_ok = h.url(controller='/case', action='digest', id=id)
+ c.url_ok = h.url(controller='case', action='digest', id=id)
return render('/casemanagement/dialogs/failed_markanonymize.mako')
# Show confirmation dialog if necessary.
@@ -389,9 +389,9 @@
u" The anonymised case will still be considered"
u" for the analysis.<br>") \
% "\n".join(build_case_list([case]))
- c.url_yes = h.url(controller='/case', action='anonymize',
+ c.url_yes = h.url(controller='case', action='anonymize',
id=id, confirmed=1)
- c.url_no = h.url(controller='/case', action='digest', id=id)
+ c.url_no = h.url(controller='case', action='digest', id=id)
return render('/casemanagement/dialogs/confirm_anonymize.mako')
try:
@@ -508,9 +508,9 @@
" The case will be editable afterwards again"
" for the users.<br>") \
% "\n".join(build_case_list([case]))
- c.url_yes = h.url(controller='/case', action='restore', id=id,
+ c.url_yes = h.url(controller='case', action='restore', id=id,
confirmed=1)
- c.url_no = h.url(controller='/case_overview')
+ c.url_no = h.url(controller='case_overview', action='index')
return render('/casemanagement/dialogs/confirm_restore.mako')
#
@@ -694,9 +694,9 @@
c.dialog_title = _('Copy case?')
c.dialog_text = _('Do you really want to copy this case?'
' All data will be copied in the new case.')
- c.url_yes = h.url(controller='/case', action='copy',
+ c.url_yes = h.url(controller='case', action='copy',
id=id, confirmed=1)
- c.url_no = h.url(controller='/case', action='digest', id=id)
+ c.url_no = h.url(controller='case', action='digest', id=id)
return render('/casemanagement/dialogs/confirm_copy.mako')
@checkRole("cm")
@@ -727,7 +727,7 @@
else:
c.dialog_text = _("An error occurred during the import."
" Click 'OK' to return to the import dialog.")
- c.url_ok = h.url(controller='/case', action='importCase')
+ c.url_ok = h.url(controller='case', action='importCase')
return render('/casemanagement/dialogs/failed_xml_import.mako')
#
Modified: base/trunk/mpulsweb/controllers/document.py
===================================================================
--- base/trunk/mpulsweb/controllers/document.py 2012-03-08 13:06:04 UTC (rev 5885)
+++ base/trunk/mpulsweb/controllers/document.py 2012-03-08 13:31:18 UTC (rev 5886)
@@ -55,7 +55,7 @@
@checkRole(('admin', 'cm'))
def index(self):
- redirect(url(action='globalOverview'))
+ redirect(url(action='globalOverview', action='index'))
@checkRole(('admin', 'cm'))
def globalOverview(self):
Modified: base/trunk/mpulsweb/controllers/news.py
===================================================================
--- base/trunk/mpulsweb/controllers/news.py 2012-03-08 13:06:04 UTC (rev 5885)
+++ base/trunk/mpulsweb/controllers/news.py 2012-03-08 13:31:18 UTC (rev 5886)
@@ -27,7 +27,7 @@
if confirmed == 1:
user = UserObject(session_user.id)
user.setNewsAsRead(id)
- redirect(url(controller='/'))
+ redirect(url('/'))
else:
c.dialog_title = _(u"Mark message as read")
c.dialog_text = _(u"""Do you really want to mark the message as read?
More information about the Mpuls-commits
mailing list