[Mpuls-commits] r2765 - in base/trunk: . mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed May 26 16:01:04 CEST 2010


Author: bh
Date: 2010-05-26 16:01:03 +0200 (Wed, 26 May 2010)
New Revision: 2765

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/appointment.py
Log:
* mpulsweb/controllers/appointment.py
(AppointmentController.createAction)
(AppointmentController.editAction)
(AppointmentController.delete): Use h.url_for consistently for
all-intra application URLs.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-05-26 14:00:26 UTC (rev 2764)
+++ base/trunk/ChangeLog	2010-05-26 14:01:03 UTC (rev 2765)
@@ -1,5 +1,13 @@
 2010-05-26  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/appointment.py
+	(AppointmentController.createAction)
+	(AppointmentController.editAction)
+	(AppointmentController.delete): Use h.url_for consistently for
+	all-intra application URLs.
+
+2010-05-26  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/administration.py
 	(AdministrationController.editUserAction)
 	(AdministrationController.resetUserPassword)

Modified: base/trunk/mpulsweb/controllers/appointment.py
===================================================================
--- base/trunk/mpulsweb/controllers/appointment.py	2010-05-26 14:00:26 UTC (rev 2764)
+++ base/trunk/mpulsweb/controllers/appointment.py	2010-05-26 14:01:03 UTC (rev 2765)
@@ -97,7 +97,7 @@
             appointment.store()
             c.dialog_title = CREATE_APPOINT_NOTIFICATION_SUCCESS
             c.dialog_text = CREATE_APPOINT_NOTIFICATION_TEXT_SUCCESS
-            c.url_ok = "/appointment/overview"
+            c.url_ok = url_for(controller='/appointment', action='overview')
             return render('/appointments/dialogs/success_create_appointment.mako')
         except formencode.Invalid, error:
             c.form_result = error.value
@@ -149,7 +149,7 @@
             appointment.store()
             c.dialog_title = EDIT_APPOINT_NOTIFICATION_SUCCESS
             c.dialog_text = EDIT_APPOINT_NOTIFICATION_TEXT_SUCCESS
-            c.url_ok = "/appointment/overview"
+            c.url_ok = url_for(controller='/appointment', action='overview')
             return render('/appointments/dialogs/success_edit_appointment.mako')
         except formencode.Invalid, error:
             c.form_result = error.value
@@ -170,14 +170,15 @@
             appointment.delete()
             c.dialog_title = DELETE_APPOINT_NOTIFICATION_SUCCESS
             c.dialog_text = DELETE_APPOINT_NOTIFICATION_TEXT_SUCCESS
-            c.url_ok = "/appointment/overview"
+            c.url_ok = url_for(controller='/appointment', action='overview')
             return render('/appointments/dialogs/success_delete_appointment.mako')
         else:
             c.context = "../main.mako"
             c.dialog_title = DELETE_APPOINT_CONFIRM
             c.dialog_text = DELETE_APPOINT_CONFIRM_TEXT
-            c.url_yes = "/appointment/delete/%s/1" % id
-            c.url_no = "/appointment/overview/"
+            c.url_yes = url_for(controller='/appointment', action='delete',
+                                id=id, confirmed=1)
+            c.url_no = url_for(controller='/appointment', action='overview')
             return render('/appointments/dialogs/confirm.mako')
 
     @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))



More information about the Mpuls-commits mailing list