[Mpuls-commits] r5870 - base/trunk/mpulsweb/templates/evaluation

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 7 15:59:56 CET 2012


Author: ludwig
Date: 2012-03-07 15:59:56 +0100 (Wed, 07 Mar 2012)
New Revision: 5870

Modified:
   base/trunk/mpulsweb/templates/evaluation/agencylist.mako
   base/trunk/mpulsweb/templates/evaluation/evaluate.mako
   base/trunk/mpulsweb/templates/evaluation/overview.mako
   base/trunk/mpulsweb/templates/evaluation/result.mako
   base/trunk/mpulsweb/templates/evaluation/search.mako
Log:
Issue 2738: Replace url_for with url (templates/evaluation)


Modified: base/trunk/mpulsweb/templates/evaluation/agencylist.mako
===================================================================
--- base/trunk/mpulsweb/templates/evaluation/agencylist.mako	2012-03-07 14:41:51 UTC (rev 5869)
+++ base/trunk/mpulsweb/templates/evaluation/agencylist.mako	2012-03-07 14:59:56 UTC (rev 5870)
@@ -35,29 +35,29 @@
   % for title, urlpart, style, roles, get_value in fields:
     % if h.hasRole(roles):
       <th class="${style} table_header_h">${title}
-        <a href="${h.url_for(controller='evaluation_overview', action='overview',
+        <a href="${h.url(controller='evaluation_overview', action='overview',
                              sort_field=urlpart, sort_order='asc')}">
             <img class   = "sorticon"
             %if c.sort_field == urlpart and c.sort_order == 'asc':
-                src    = "${h.url_for('/images/icons/sort_asc_active.png')}"
+                src    = "${h.url('/images/icons/sort_asc_active.png')}"
                 alt    = "${_("Sorted by %s in ascending order") % title}"
                 title  = "${_("Sorted by %s in ascending order") % title}"
             %else:
-                src    = "${h.url_for('/images/icons/sort_asc.png')}"
+                src    = "${h.url('/images/icons/sort_asc.png')}"
                 alt    = "${_("Sort in ascending order")}"
                 title  = "${_("Sort in ascending order")}"
             %endif
                 width  = "10"
                 height = "9"></a>
-        <a href="${h.url_for(controller='evaluation_overview', action='overview',
+        <a href="${h.url(controller='evaluation_overview', action='overview',
                              sort_field=urlpart, sort_order='desc')}">
             <img class   = "sorticon"
             %if c.sort_field == urlpart and c.sort_order == 'desc':
-                src    = "${h.url_for('/images/icons/sort_desc_active.png')}"
+                src    = "${h.url('/images/icons/sort_desc_active.png')}"
                 alt    = "${_("Sorted by %s in descending order") % title}"
                 title  = "${_("Sorted by %s in descending order") % title}"
             %else:
-                src    = "${h.url_for('/images/icons/sort_desc.png')}"
+                src    = "${h.url('/images/icons/sort_desc.png')}"
                 alt    = "${_("Sort in descending order")}"
                 title  = "${_("Sort in descending order")}"
             %endif

Modified: base/trunk/mpulsweb/templates/evaluation/evaluate.mako
===================================================================
--- base/trunk/mpulsweb/templates/evaluation/evaluate.mako	2012-03-07 14:41:51 UTC (rev 5869)
+++ base/trunk/mpulsweb/templates/evaluation/evaluate.mako	2012-03-07 14:59:56 UTC (rev 5870)
@@ -4,8 +4,8 @@
 <div>
   ##<div class="widget modusfield actions">
   ##  <ul>
-  ##    <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>
+  ##    <li><a href="${h.url(controller='administration', action='resetPassword', id=c.user.id)}">${_('Reset password')}</a></li>
+  ##    <li><a href="${h.url(controller='administration', action='listUsers')}">${_('Back to userlist')}</a></li>
   ##  </ul>
   ##</div>
   <div class="header">
@@ -13,7 +13,7 @@
   </div>
 </div>
 <div>
-<form action="${h.url_for(controller='/evaluate', action='evaluateAction')}" method="POST" target="_blank">
+<form action="${h.url(controller='evaluate', action='evaluateAction')}" method="POST" target="_blank">
 <% 
    if c.adele_evaluation:
        adele_disabled = h.literal('disabled="disabled"')
@@ -65,7 +65,7 @@
   <tr>
     <td class="label">${_('Filter')}</td>
     <td>
-      ${_("Yes")} (<a href="${h.url_for(controller='/evaluate', action='reset_filter', id=c.eval_config_id)}">${_("Reset")}</a>)<br>
+      ${_("Yes")} (<a href="${h.url(controller='evaluate', action='reset_filter', id=c.eval_config_id)}">${_("Reset")}</a>)<br>
       ${(ungettext("%d case has been selected for evaluation",
                    "%d cases have been selected for evaluation",
                    len(evaluation_ids)) % len(evaluation_ids))}

Modified: base/trunk/mpulsweb/templates/evaluation/overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/evaluation/overview.mako	2012-03-07 14:41:51 UTC (rev 5869)
+++ base/trunk/mpulsweb/templates/evaluation/overview.mako	2012-03-07 14:59:56 UTC (rev 5870)
@@ -3,7 +3,7 @@
 <%!  import mpulsweb.lib.helper.filters as F %>
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
-  <li><a href="${h.url_for(controller='/case_overview')}">${_('Agency overview')}</a></li>
+  <li><a href="${h.url(controller='case_overview')}">${_('Agency overview')}</a></li>
 </%def>
 <h1>${_('Agency overview')} (${_('Datadump of')}
 ${h.NA(h.dd_mm_YYYY(c.datadump))})</h1>
@@ -17,7 +17,7 @@
 <%include file="/evaluation/search.mako" />
 ${ungettext('%s case in %s agency was found.', '%s cases in %s agencys where found.', c.count_all) % (c.count_all, c.count_agency)}
 <div class="waska_form">
-  <form action="${h.url_for(controller='/evaluation_overview', action='bundleAction')}"
+  <form action="${h.url(controller='evaluation_overview', action='bundleAction')}"
         method="POST">
   <%include file="./agencylist.mako" />
   <div class="waska_form_element">

Modified: base/trunk/mpulsweb/templates/evaluation/result.mako
===================================================================
--- base/trunk/mpulsweb/templates/evaluation/result.mako	2012-03-07 14:41:51 UTC (rev 5869)
+++ base/trunk/mpulsweb/templates/evaluation/result.mako	2012-03-07 14:59:56 UTC (rev 5870)
@@ -8,12 +8,12 @@
     <meta http-equiv="expires" content="0">
 
 	<link rel="shortcut icon" type="image/x-icon" 
-		href="${h.url_for('/images/mpuls.ico')}">
-    <link href="${h.url_for('/styles/all.css')}" media="all" 
+		href="${h.url('/images/mpuls.ico')}">
+    <link href="${h.url('/styles/all.css')}" media="all" 
           rel="stylesheet" type="text/css">
-    <link href="${h.url_for('/styles/screen.css')}" media="screen" 
+    <link href="${h.url('/styles/screen.css')}" media="screen" 
           rel="stylesheet" type="text/css">
-    <link href="${h.url_for('/styles/print.css')}" media="print"
+    <link href="${h.url('/styles/print.css')}" media="print"
           rel="stylesheet" type="text/css">
   </head>
   <body>
@@ -21,13 +21,13 @@
     <div id="modusfield">
       <div class="actions">
         <ul>
-          ## In the following two url_for calls for /evaluate/exportXML
+          ## In the following two url 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',
+          <li><a href="${h.url(controller='evaluate', action='exportXML',
                                    id='evaluation_export.xml')}"
                  target="_blank">${_('Export XML')}</a></li>
-          <li><a href="${h.url_for(controller='/evaluate', action='exportCSV',
+          <li><a href="${h.url(controller='evaluate', action='exportCSV',
                                    id='evaluation_export.csv')}"
                  target="_blank">${_('Export CSV')}</a></li>
         </ul>

Modified: base/trunk/mpulsweb/templates/evaluation/search.mako
===================================================================
--- base/trunk/mpulsweb/templates/evaluation/search.mako	2012-03-07 14:41:51 UTC (rev 5869)
+++ base/trunk/mpulsweb/templates/evaluation/search.mako	2012-03-07 14:59:56 UTC (rev 5870)
@@ -2,23 +2,23 @@
 <%inherit file="/search/search.mako" />
 <%def name="buildFormHeader()">
   <form method="post" name="case_search"
-        action="${h.url_for(controller='/evaluation_overview', action='search')}" 
+        action="${h.url(controller='evaluation_overview', action='search')}" 
         accept-charset="UTF-8">
 </%def>
 <%def name="showCount(num)">
 </%def>
 <%def name="buildSearchReset()">
-  <a href="${h.url_for(controller='evaluation_overview', action='overview', reset=1)}">${_('Reset search')}</a>
+  <a href="${h.url(controller='evaluation_overview', action='overview', reset=1)}">${_('Reset search')}</a>
 </%def>
 <%def name="buildSearchExtend()">
-  <a href="${h.url_for(controller='evaluation_overview', action='overview', reset=1)}">${_('Reset search')}</a>
+  <a href="${h.url(controller='evaluation_overview', action='overview', reset=1)}">${_('Reset search')}</a>
 </%def>
 <%def name="buildSearchExtend()">
   % if c.extended_search:
-    <a href="${h.url_for(controller='evaluation_overview',
+    <a href="${h.url(controller='evaluation_overview',
                          action='overview_extended')}">${_('Hide extended search')}</a>
   % else:
-    <a href="${h.url_for(controller='evaluation_overview', 
+    <a href="${h.url(controller='evaluation_overview', 
                          action='overview_extended')}">${_('Show extended search')}</a>
   % endif
   ${h.getHelp('extended_search')}



More information about the Mpuls-commits mailing list