[Mpuls-commits] r2748 - in base/trunk: . mpulsweb/templates/formularpage

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue May 25 20:30:00 CEST 2010


Author: bh
Date: 2010-05-25 20:29:59 +0200 (Tue, 25 May 2010)
New Revision: 2748

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/templates/formularpage/formular.mako
Log:
* mpulsweb/templates/formularpage/formular.mako: Use h.url_for
consistently for all-intra application URLs.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-05-25 18:28:32 UTC (rev 2747)
+++ base/trunk/ChangeLog	2010-05-25 18:29:59 UTC (rev 2748)
@@ -1,5 +1,10 @@
 2010-05-25  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/templates/formularpage/formular.mako: Use h.url_for
+	consistently for all-intra application URLs.
+
+2010-05-25  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/templates/evaluation/evaluate.mako,
 	mpulsweb/templates/evaluation/evaluate_adele.mako,
 	mpulsweb/templates/evaluation/result.mako: Use h.url_for

Modified: base/trunk/mpulsweb/templates/formularpage/formular.mako
===================================================================
--- base/trunk/mpulsweb/templates/formularpage/formular.mako	2010-05-25 18:28:32 UTC (rev 2747)
+++ base/trunk/mpulsweb/templates/formularpage/formular.mako	2010-05-25 18:29:59 UTC (rev 2748)
@@ -4,11 +4,17 @@
 
 <%def name="buildNavipath()">
       	${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case').id}/1" onclick="return checkModification();">${_('cm_np_select')}</a></li>
+	<li><a href="${h.url_for(controller='/case', action='select',
+                                 id=session.get('case').id, confirmed=1)}"
+               onclick="return checkModification();">${_('cm_np_select')}</a></li>
         % if session.get('render_mode') == 'ro':
-	<li><a href="/formularpage/show/${c.page_id}" onclick="return checkModification();">${h.get_pagename(c.page_id)}</a></li>
+	<li><a href="${h.url_for(controller='/formularpage', action='show',
+                                 id=c.page_id)}"
+               onclick="return checkModification();">${h.get_pagename(c.page_id)}</a></li>
         % else:
-	<li><a href="/formularpage/edit/${c.page_id}" onclick="return checkModification();">${h.get_pagename(c.page_id)}</a></li>
+	<li><a href="${h.url_for(controller='/formularpage', action='edit',
+                                 id=c.page_id)}" 
+               onclick="return checkModification();">${h.get_pagename(c.page_id)}</a></li>
         % endif
 </%def>
 
@@ -25,12 +31,18 @@
       <ul>
         % if h.hasRole(['cm_ka']) and session.get('case').getState().state not in (3,4,5):
           % if session.get('render_mode') == 'ro':
-            <li><a href="/formularpage/edit/${c.page_id}" onclick="return checkModification();"> ${_('cm_actions_link_edit')}</a></li>
+            <li><a href="${h.url_for(controller='/formularpage', action='edit',
+                                     id=c.page_id)}" 
+                   onclick="return checkModification();"> ${_('cm_actions_link_edit')}</a></li>
           % else:
-            <li><a href="/formularpage/show/${c.page_id}" onclick="return checkModification();"> ${_('cm_actions_link_show')}</a></li>
+            <li><a href="${h.url_for(controller='/formularpage', action='show',
+                                     id=c.page_id)}" 
+                   onclick="return checkModification();"> ${_('cm_actions_link_show')}</a></li>
           % endif
         % endif
-        <li><a href="/formularpage/printout/${c.page_id}" target="_blank" onclick="return checkModification();"> ${_('cm_actions_link_printout')}</a></li>
+        <li><a href="${h.url_for(controller='/formularpage', action='printout',
+                                 id=c.page_id)}" 
+               target="_blank" onclick="return checkModification();"> ${_('cm_actions_link_printout')}</a></li>
       </ul>
     </div>
   </div>



More information about the Mpuls-commits mailing list