[Mpuls-commits] r5893 - in wasko/trunk/waskoweb: controllers templates/caselifetime templates/casemanagement

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Fri Mar 9 10:44:08 CET 2012


Author: ludwig
Date: 2012-03-09 10:44:08 +0100 (Fri, 09 Mar 2012)
New Revision: 5893

Modified:
   wasko/trunk/waskoweb/controllers/caselifetime.py
   wasko/trunk/waskoweb/templates/caselifetime/abbruch.mako
   wasko/trunk/waskoweb/templates/caselifetime/neuaufnahme.mako
   wasko/trunk/waskoweb/templates/caselifetime/verlaengerung.mako
   wasko/trunk/waskoweb/templates/caselifetime/wiederaufnahme.mako
   wasko/trunk/waskoweb/templates/casemanagement/new.mako
Log:
Issue 2738: Add controller, action,id, confirmed keywords to url controller 
calls, which misses the keywords. Unification of the type of url calls.


Modified: wasko/trunk/waskoweb/controllers/caselifetime.py
===================================================================
--- wasko/trunk/waskoweb/controllers/caselifetime.py	2012-03-09 09:11:40 UTC (rev 5892)
+++ wasko/trunk/waskoweb/controllers/caselifetime.py	2012-03-09 09:44:08 UTC (rev 5893)
@@ -296,7 +296,7 @@
 The entry documentation was successfully aborted. The case document was given
 to the administration for deletion. Click on OK to get back to the
 case documents overview.''')
-            c.url_ok = h.url(controller="/case_overview", action='index')
+            c.url_ok = h.url(controller="case_overview", action='index')
             return render('caselifetime/dialogs/success_reopen.mako')
         else:
             c.confirm_for = _(u'Do you want to abort the entry documentation?')
@@ -305,8 +305,10 @@
 for deletion? The case document will not be editable then and will be given to
 the administration for seletion.''')
 
-            c.url_yes = h.url("/caselifetime/abortcase/%s/1" % id)
-            c.url_no = h.url("/caselifetime/index/%s" % id)
+            c.url_yes = h.url(controller="caselifetime", action="abortcase", 
+                              id=id, confirmed="1")
+            c.url_no = h.url(controller="caselifetime", action="index",
+                             id=id)
             return render('caselifetime/dialogs/confirm_reopen.mako')
 
     def abortAction(self, id):
@@ -399,7 +401,7 @@
 The case document was renewed. Click on OK to open the new case document.
 Please check the data and update them, if needed. The old case document
 was given to the administration for Anonymizing.''')
-            c.url_ok = h.url(controller="case/select/%s" % new_id)
+            c.url_ok = h.url(controller="case",action="select", id=new_id)
             return render('caselifetime/dialogs/success_reopen.mako')
         else:
             c.confirm_for = _(u"Do you want to renew the case?")
@@ -407,8 +409,9 @@
 Do you want to renew the case? Then the current case document will be
 anonymized and important parts of phase A and phase B will be copied into a
 new case document. You will work on the new case document then.""")
-            c.url_yes = h.url("/caselifetime/renew_ok/%s/1" % id)
-            c.url_no = h.url("/caselifetime/index/%s" % id)
+            c.url_yes = h.url(controller="caselifetime", action="renew_ok",
+                              id=id, confirmed="1")
+            c.url_no = h.url(controller="caselifetime", action="index", id=id)
             return render('caselifetime/dialogs/confirm_reopen.mako')
 
     def renew_notok(self, id, confirmed='0'):
@@ -437,8 +440,9 @@
             c.question =  _(u"""\
 You entered, that no acceptence of the new subscription is available.
 If you continue, no new addition of this case will be possible.""")
-            c.url_yes = h.url("/caselifetime/renew_notok/%s/1" % id)
-            c.url_no = h.url("/caselifetime/index/%s" % id)
+            c.url_yes = h.url(controller="caselifetime", action="renew_notok",
+                              id=id, confirmed="1")
+            c.url_no = h.url(controller="caselifetime",action="index", id=id)
             return render('caselifetime/dialogs/confirm_reopen.mako')
 
     def reopen_ok(self, id, confirmed='0'):
@@ -532,15 +536,21 @@
 Do you want to reopen the case? Then the current case document will be
 anonymized and important parts of the case document copied from phase A and
 phase B in the new case document. You will work with the new case document.""")
-                c.url_yes = h.url("/caselifetime/reopen_ok/%s/1" % id)
-                c.url_no = h.url("/caselifetime/index/%s" % id)
+                c.url_yes = h.url(controller="caselifetime",
+                                  action="reopen_ok",
+                                  id=id, confirmed="1")
+                c.url_no = h.url(controller="caselifetime", action="index",
+                                 id=id)
             else:
                 c.confirm_for = _(u"Do you want to reopen the case for 3 months?")
                 c.question = _(u"""\
 Do you want to reopen the case for 3 months? You can edit the case document
 again.""")
-                c.url_yes = h.url("/caselifetime/reopen_ok/%s/1" % id)
-                c.url_no = h.url("/caselifetime/index/%s" %id)
+                c.url_yes = h.url(controller="caselifetime",
+                                  action="reopen_ok",
+                                  id=id, confirmed="1")
+                c.url_no = h.url(controller="caselifetime", action="index",
+                                 id=id)
             return render('caselifetime/dialogs/confirm_reopen.mako')
 
     def reopen_notok(self, id, confirmed='0'):
@@ -574,8 +584,9 @@
             c.question =  _(u"""\
 You have entered, that no acceptence is available. \
 If you continue, reopening, extension or addition will not be possible.""")
-            c.url_yes = h.url("/caselifetime/reopen_notok/%s/1" % id)
-            c.url_no = h.url("/caselifetime/index/%s" % id)
+            c.url_yes = h.url(controller="caselifetime", action="reopen_notok",
+                              id=id, confirmed="1")
+            c.url_no = h.url(controller="caselifetime", action="index", id=id)
             return render('caselifetime/dialogs/confirm_reopen.mako')
 
     def reopenAction(self):

Modified: wasko/trunk/waskoweb/templates/caselifetime/abbruch.mako
===================================================================
--- wasko/trunk/waskoweb/templates/caselifetime/abbruch.mako	2012-03-09 09:11:40 UTC (rev 5892)
+++ wasko/trunk/waskoweb/templates/caselifetime/abbruch.mako	2012-03-09 09:44:08 UTC (rev 5893)
@@ -1,7 +1,7 @@
 ## -*- coding: utf-8 -*-
 
 <fieldset class="${not c.show_abort and 'inactive' or ''}">
-  <legend>${_('Abort of the initial documentation')}<a target="_blank" href="${h.url('/annotations/help/abbruch')}"><img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0"></a></legend>
+  <legend>${_('Abort of the initial documentation')}<a target="_blank" href="${h.url(controller='annotations', action='help', id='abbruch')}"><img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0"></a></legend>
   % if c.show_abort:
     <input type="submit" name="abort" value="${_('Execute')}" ${h.hasRole(['admin']) and 'disabled' or ''}>
   %else:

Modified: wasko/trunk/waskoweb/templates/caselifetime/neuaufnahme.mako
===================================================================
--- wasko/trunk/waskoweb/templates/caselifetime/neuaufnahme.mako	2012-03-09 09:11:40 UTC (rev 5892)
+++ wasko/trunk/waskoweb/templates/caselifetime/neuaufnahme.mako	2012-03-09 09:44:08 UTC (rev 5893)
@@ -1,7 +1,7 @@
 ## -*- coding: utf-8 -*-
 
 <fieldset class="${not c.show_neuaufnahme and 'inactive' or ''}">
-  <legend>${_('New subsription after other ending')}<a target="_blank" href="${h.url('/annotations/help/neuaufnahme')}"><img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0"></a></legend>
+  <legend>${_('New subsription after other ending')}<a target="_blank" href="${h.url(controller='annotations', action='help', id='neuaufnahme')}"><img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0"></a></legend>
   % if c.show_neuaufnahme:
     <table>
       <tr>

Modified: wasko/trunk/waskoweb/templates/caselifetime/verlaengerung.mako
===================================================================
--- wasko/trunk/waskoweb/templates/caselifetime/verlaengerung.mako	2012-03-09 09:11:40 UTC (rev 5892)
+++ wasko/trunk/waskoweb/templates/caselifetime/verlaengerung.mako	2012-03-09 09:44:08 UTC (rev 5893)
@@ -1,7 +1,7 @@
 ## -*- coding: utf-8 -*-
 
 <fieldset class="${not c.show_verlaengerung and 'inactive' or ''}">
-  <legend>${_('extension of the integration process')}<a target="_blank" href="${h.url('/annotations/help/verlaengerung')}"><img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0"></a></legend>
+  <legend>${_('extension of the integration process')}<a target="_blank" href="${h.url(controller='annotations', action='help', id='verlaengerung')}"><img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0"></a></legend>
   % if c.show_verlaengerung:
     <strong>${_('First extension')}</strong>
     <table class="${c.num_verlaengerung >= 1 and 'inactive' or ''}"> 

Modified: wasko/trunk/waskoweb/templates/caselifetime/wiederaufnahme.mako
===================================================================
--- wasko/trunk/waskoweb/templates/caselifetime/wiederaufnahme.mako	2012-03-09 09:11:40 UTC (rev 5892)
+++ wasko/trunk/waskoweb/templates/caselifetime/wiederaufnahme.mako	2012-03-09 09:44:08 UTC (rev 5893)
@@ -1,7 +1,7 @@
 ## -*- coding: utf-8 -*-
 
 <fieldset class="${not c.show_wiedervorlage and 'inactive' or ''}">
-  <legend>${_('Reopening after successful reintegration')}<a target="_blank" href="${h.url('/annotations/help/wiederaufnahme')}"><img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0"></a></legend>
+  <legend>${_('Reopening after successful reintegration')}<a target="_blank" href="${h.url(controller='annotations', action='help', id='wiederaufnahme')}"><img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0"></a></legend>
   % if c.show_wiedervorlage:
     <strong>${_('Reopening of the youth case for 3 month')}</strong>
     <table class="${c.num_wiederaufnahme >= 1 and 'inactive' or ''}">

Modified: wasko/trunk/waskoweb/templates/casemanagement/new.mako
===================================================================
--- wasko/trunk/waskoweb/templates/casemanagement/new.mako	2012-03-09 09:11:40 UTC (rev 5892)
+++ wasko/trunk/waskoweb/templates/casemanagement/new.mako	2012-03-09 09:44:08 UTC (rev 5893)
@@ -83,12 +83,12 @@
       <label for="type_aufnahme_1">${_('Initial admission')}</label><br>
       <input type="radio" name="aufnahme_typ" value="1" id="type_aufnahme_2">
       <label for="type_aufnahme_2">${_('Reopening after successful reintegration')}</label>
-      <a target="_blank" href="${h.url('/annotations/help/wiederaufnahme')}">
+      <a target="_blank" href="${h.url(controller='annotations', action='help', id='wiederaufnahme')}">
         <img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0">
       </a><br>
       <input type="radio" name="aufnahme_typ" value="2" id="type_aufnahme_3">
       <label for="type_aufnahme_3">${_('New admission after other termination')}</label> 
-      <a target="_blank" href="${h.url('/annotations/help/neuaufnahme')}">
+      <a target="_blank" href="${h.url(controller='annotations', action='help', id='neuaufnahme')}">
         <img alt="${_('help icon')}" src="${h.url('/images/icons/form_help.png')}" border="0">
       </a>
     </fieldset>



More information about the Mpuls-commits mailing list