[Mpuls-commits] r2747 - in base/trunk: . mpulsweb/templates/evaluation

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


Author: bh
Date: 2010-05-25 20:28:32 +0200 (Tue, 25 May 2010)
New Revision: 2747

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/templates/evaluation/evaluate.mako
   base/trunk/mpulsweb/templates/evaluation/evaluate_adele.mako
   base/trunk/mpulsweb/templates/evaluation/result.mako
Log:
* mpulsweb/templates/evaluation/evaluate.mako,
mpulsweb/templates/evaluation/evaluate_adele.mako,
mpulsweb/templates/evaluation/result.mako: Use h.url_for
consistently for all-intra application URLs.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-05-25 18:26:58 UTC (rev 2746)
+++ base/trunk/ChangeLog	2010-05-25 18:28:32 UTC (rev 2747)
@@ -1,5 +1,12 @@
 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
+	consistently for all-intra application URLs.
+
+2010-05-25  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/templates/documents/case_new.mako,
 	mpulsweb/templates/documents/case_overview.mako,
 	mpulsweb/templates/documents/dialogs/confirm.mako,

Modified: base/trunk/mpulsweb/templates/evaluation/evaluate.mako
===================================================================
--- base/trunk/mpulsweb/templates/evaluation/evaluate.mako	2010-05-25 18:26:58 UTC (rev 2746)
+++ base/trunk/mpulsweb/templates/evaluation/evaluate.mako	2010-05-25 18:28:32 UTC (rev 2747)
@@ -4,8 +4,8 @@
 <div>
   ##<div class="widget modusfield actions">
   ##  <ul>
-  ##    <li><a href="/administration/resetPassword/${c.user.id}">${_('Reset password')}</a></li>
-  ##    <li><a href="/administration/listUsers">${_('Back to userlist')}</a></li>
+  ##    <li><a href="${h.url_for(controller='/administration', action='resetPassword', id=c.user.id)}">${_('Reset password')}</a></li>
+  ##    <li><a href="${h.url_for(controller='/administration', action='listUsers')}">${_('Back to userlist')}</a></li>
   ##  </ul>
   ##</div>
   <div class="header">
@@ -13,7 +13,7 @@
   </div>
 </div>
 <div>
-<form action="/evaluate/evaluateAction" method="POST" target="_blank">
+<form action="${h.url_for(controller='/evaluate', action='evaluateAction')}" method="POST" target="_blank">
 <input type="hidden" name="id">
 <table>
   <tr>
@@ -56,7 +56,7 @@
   <tr>
     <td class="label">${_('Filter')}</td>
     <td>
-      Yes (<a href="/evaluate/resetFilter/${c.evalconfig.get_setid()}">Reset</a>)<br>
+      Yes (<a href="${h.url_for(controller='/evaluate', action='resetFilter', id=c.evalconfig.get_setid())}">Reset</a>)<br>
       ${session['evaluation.options'].get('sql')}
     </td>
   </tr>

Modified: base/trunk/mpulsweb/templates/evaluation/evaluate_adele.mako
===================================================================
--- base/trunk/mpulsweb/templates/evaluation/evaluate_adele.mako	2010-05-25 18:26:58 UTC (rev 2746)
+++ base/trunk/mpulsweb/templates/evaluation/evaluate_adele.mako	2010-05-25 18:28:32 UTC (rev 2747)
@@ -4,8 +4,8 @@
 <div>
   ##<div class="widget modusfield actions">
   ##  <ul>
-  ##    <li><a href="/administration/resetPassword/${c.user.id}">${_('Reset password')}</a></li>
-  ##    <li><a href="/administration/listUsers">${_('Back to userlist')}</a></li>
+  ##    <li><a href="${h.url_for(controller='/administration', action='resetPassword', id=c.user.id)}">${_('Reset password')}</a></li>
+  ##    <li><a href="${h.url_for(controller='/administration', action='listUsers')}">${_('Back to userlist')}</a></li>
   ##  </ul>
   ##</div>
   <div class="header">
@@ -13,7 +13,7 @@
   </div>
 </div>
 <div>
-<form action="/evaluate/evaluateAction" method="POST" target="_blank">
+<form action="${h.url_for(controller='/evaluate', action='evaluateAction')}" method="POST" target="_blank">
 <input type="hidden" name="id">
 <table>
   <tr>
@@ -55,7 +55,7 @@
   <tr>
     <td class="label">${_('Filter')}</td>
     <td>
-      Yes (<a href="/evaluate/resetFilter/${c.evalconfig.get_setid()}">Reset</a>)<br>
+      Yes (<a href="${h.url_for(controller='/evaluate', action='resetFilter', id=c.evalconfig.get_setid())}">Reset</a>)<br>
       ${session['evaluation.options'].get('sql')}
     </td>
   </tr>

Modified: base/trunk/mpulsweb/templates/evaluation/result.mako
===================================================================
--- base/trunk/mpulsweb/templates/evaluation/result.mako	2010-05-25 18:26:58 UTC (rev 2746)
+++ base/trunk/mpulsweb/templates/evaluation/result.mako	2010-05-25 18:28:32 UTC (rev 2747)
@@ -7,18 +7,29 @@
     <meta http-equiv="content-style-type" content="text/css">
     <meta http-equiv="expires" content="0">
 
-    <link rel="shortcut icon" type="image/x-icon" href="/images/kompetenz3.ico">
-    <link href="/styles/all.css" media="all" rel="stylesheet" type="text/css">
-    <link href="/styles/screen.css" media="screen" rel="stylesheet" type="text/css">
-    <link href="/styles/print.css" media="print" rel="stylesheet" type="text/css">
+    <link rel="shortcut icon" type="image/x-icon"
+          href="${h.url_for('/images/kompetenz3.ico')}">
+    <link href="${h.url_for('/styles/all.css')}" media="all" 
+          rel="stylesheet" type="text/css">
+    <link href="${h.url_for('/styles/screen.css')}" media="screen" 
+          rel="stylesheet" type="text/css">
+    <link href="${h.url_for('/styles/print.css')}" media="print"
+          rel="stylesheet" type="text/css">
   </head>
   <body>
     <div id="content_header_large">
     <div id="modusfield">
       <div class="actions">
         <ul>
-          <li><a href="/evaluate/exportXML/evaluation_export.xml" target="_blank">${_('Export XML')}</a></li>
-          <li><a href="/evaluate/exportCSV/evaluation_export.csv" target="_blank">${_('Export CSV')}</a></li>
+          ## In the following two url_for calls for /evaluate/exportXML
+          ## and /evaluate/exportXML, the filename is not actually an
+          ## id, but as far as routing is concerned, it is one.
+          <li><a href="${h.url_for(controller='/evaluate', action='exportXML',
+                                   id='evaluation_export.xml')}"
+                 target="_blank">${_('Export XML')}</a></li>
+          <li><a href="${h.url_for(controller='/evaluate', action='exportCSV',
+                                   id='evaluation_export.csv')}"
+                 target="_blank">${_('Export CSV')}</a></li>
         </ul>
       </div>
     </div>



More information about the Mpuls-commits mailing list