[Mpuls-commits] r5875 - base/trunk/mpulsweb/templates/meta

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 8 11:13:04 CET 2012


Author: ludwig
Date: 2012-03-08 11:13:04 +0100 (Thu, 08 Mar 2012)
New Revision: 5875

Modified:
   base/trunk/mpulsweb/templates/meta/case.mako
   base/trunk/mpulsweb/templates/meta/disallow.mako
   base/trunk/mpulsweb/templates/meta/index.mako
   base/trunk/mpulsweb/templates/meta/search.mako
   base/trunk/mpulsweb/templates/meta/statement1.mako
   base/trunk/mpulsweb/templates/meta/statement2.mako
   base/trunk/mpulsweb/templates/meta/unlink.mako
Log:
Issue 2738: Replace url_for (templates/meta)


Modified: base/trunk/mpulsweb/templates/meta/case.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/case.mako	2012-03-08 10:08:59 UTC (rev 5874)
+++ base/trunk/mpulsweb/templates/meta/case.mako	2012-03-08 10:13:04 UTC (rev 5875)
@@ -19,7 +19,7 @@
   <div id="modusfield">
     <div class="actions">
       <ul>
-          <li><a href="${h.url_for(controller='/meta', action='index',
+          <li><a href="${h.url(controller='meta', action='index',
                                      id=session['case'].id)}" 
                    onclick="return checkModification();"> ${_('Back to overview')}</a></li>
       </ul>

Modified: base/trunk/mpulsweb/templates/meta/disallow.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/disallow.mako	2012-03-08 10:08:59 UTC (rev 5874)
+++ base/trunk/mpulsweb/templates/meta/disallow.mako	2012-03-08 10:13:04 UTC (rev 5875)
@@ -7,12 +7,12 @@
 <h2>1. ${_('Withdraw locally and delete already uploaded data')}</h2>
 <p>${_('The agreement will be withdrawn and the link to the meta case will be deleted. No further synchronisation is possible, without a new agreement for synchronisation und relinking the case.')}</p>
 <p>${h.literal(_('Already <strong>transfered data from this case will be deleted in the meta case</strong>, and will not be available for other people anymore.'))}</p>
-<p><a href="${h.url_for(controller='/meta', action='withdraw_delete_projectdata', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Withdraw locally and delete')}</a></p>
+<p><a href="${h.url(controller='meta', action='withdraw_delete_projectdata', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Withdraw locally and delete')}</a></p>
 </div>
 <br>
 <div class="widget container">
 <h2>2. ${_('Withdraw globally and anonymize meta case')}</h2>
 <p>${_('The agreement will be withdrawn globally.')}</p>
 <p>${h.literal(_('<strong>This leads to anonymization of the whole meta case which means that the meta case is not available in other project cases anymore!</strong>'))}</p>
-<p><a href="${h.url_for(controller='/meta', action='withdraw_anonymize_metacase', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Withdraw globally and anonymize meta case')}</a></p>
+<p><a href="${h.url(controller='meta', action='withdraw_anonymize_metacase', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Withdraw globally and anonymize meta case')}</a></p>
 </div>

Modified: base/trunk/mpulsweb/templates/meta/index.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/index.mako	2012-03-08 10:08:59 UTC (rev 5874)
+++ base/trunk/mpulsweb/templates/meta/index.mako	2012-03-08 10:13:04 UTC (rev 5875)
@@ -10,32 +10,32 @@
 % if c.meta.is_sync_allowed():
   <p>
     <strong>${_('State')}:</strong>
-    <img width="22" height="22" alt="Ok" src="${h.url_for('/images/icons/info/ok_22.png')}">
+    <img width="22" height="22" alt="Ok" src="${h.url('/images/icons/info/ok_22.png')}">
     ${_('Sychronisation is allowed')}
   </p>
   <br>
   <p>
-    <a href="${h.url_for(controller='/meta', action='disallow_sync', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Disallow transfer')}</a>
+    <a href="${h.url(controller='meta', action='disallow_sync', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Disallow transfer')}</a>
     % if c.agency.is_metauser_configured() and c.meta.is_sync_allowed() and c.meta.is_linked():
-      <a href="${h.url_for(controller='/meta', action='digest', id=session.get('case').id)}" class="button">${_('Show digest of meta')}</a>
+      <a href="${h.url(controller='meta', action='digest', id=session.get('case').id)}" class="button">${_('Show digest of meta')}</a>
     % endif
   </p>
 % elif not session.get('meta_acceptance_statement') or  not session.get('meta_discretion_statement'):
   <p>
     <strong>${_('State')}:</strong>
-    <img width="22" height="22" alt="Error" src="${h.url_for('/images/icons/info/failure_22.png')}">
+    <img width="22" height="22" alt="Error" src="${h.url('/images/icons/info/failure_22.png')}">
     ${_('Not all required statements to allow sync has be set')}
   </p>
 % endif
 ##% else:
 ##  <p>
 ##    <strong>${_('State')}:</strong>
-##    <img width="22" height="22" alt="Error" src="${h.url_for('/images/icons/info/failure_22.png')}">
+##    <img width="22" height="22" alt="Error" src="${h.url('/images/icons/info/failure_22.png')}">
 ##    ${_('Sychronisation is not allowed')}
 ##  </p>
 ##  <br>
 ##  <p>
-##    <a href="${h.url_for(controller='/meta', action='allow_sync', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Allow transfer')}</a>
+##    <a href="${h.url(controller='meta', action='allow_sync', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Allow transfer')}</a>
 ##  </p>
 ##% endif
   <table>
@@ -47,12 +47,12 @@
         </p>
         <p>
           % if not session.get('meta_acceptance_statement') and not c.meta.is_sync_allowed():
-            <a href="${h.url_for(controller='/meta', action='print_statement1', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button" target="_blank">${_('Print accpetance statement')}</a>
+            <a href="${h.url(controller='meta', action='print_statement1', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button" target="_blank">${_('Print accpetance statement')}</a>
             <br>
             <br>
-            <a href="${h.url_for(controller='/meta', action='set_statement1', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Set acceptance statement')}</a>
+            <a href="${h.url(controller='meta', action='set_statement1', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Set acceptance statement')}</a>
           % else:
-            <img width="22" height="22" alt="Ok" src="${h.url_for('/images/icons/info/ok_22.png')}">
+            <img width="22" height="22" alt="Ok" src="${h.url('/images/icons/info/ok_22.png')}">
             ${_('Acceptance statement is set')}
           %endif
         </p>
@@ -64,12 +64,12 @@
         </p>
         <p>
           % if not session.get('meta_discretion_statement') and not c.meta.is_sync_allowed():
-            <a href="${h.url_for(controller='/meta', action='print_statement2', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button" target="_blank">${_('Print discretion statement')}</a>
+            <a href="${h.url(controller='meta', action='print_statement2', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button" target="_blank">${_('Print discretion statement')}</a>
             <br>
             <br>
-            <a href="${h.url_for(controller='/meta', action='set_statement2', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Set discretion statement')}</a>
+            <a href="${h.url(controller='meta', action='set_statement2', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Set discretion statement')}</a>
           % else:
-            <img width="22" height="22" alt="Ok" src="${h.url_for('/images/icons/info/ok_22.png')}">
+            <img width="22" height="22" alt="Ok" src="${h.url('/images/icons/info/ok_22.png')}">
             ${_('Discretion statement is set')}
           %endif
         </p>
@@ -86,37 +86,37 @@
     % if c.meta.is_linked():
       <p>
         <strong>${_('State')}:</strong>
-        <img width="22" height="22" alt="Ok" src="${h.url_for('/images/icons/info/ok_22.png')}">
+        <img width="22" height="22" alt="Ok" src="${h.url('/images/icons/info/ok_22.png')}">
         ${_('Case is linked')}
       </p>
       <br>
       <p>
-        <a href="${h.url_for(controller='/meta', action='download', id=session.get('case').id)}" class="button">${_('Download meta')}</a>
-        <a href="${h.url_for(controller='/meta', action='upload', id=session.get('case').id)}" class="button">${_('Upload case')}</a>
-        <a href="${h.url_for(controller='/meta', action='unlink', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Unlink case')}</a>
+        <a href="${h.url(controller='meta', action='download', id=session.get('case').id)}" class="button">${_('Download meta')}</a>
+        <a href="${h.url(controller='meta', action='upload', id=session.get('case').id)}" class="button">${_('Upload case')}</a>
+        <a href="${h.url(controller='meta', action='unlink', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Unlink case')}</a>
       </p>
     % else:
       <p>
         <strong>${_('State')}:</strong>
-        <img width="22" height="22" alt="${_('Error')}" src="${h.url_for('/images/icons/info/failure_22.png')}">
+        <img width="22" height="22" alt="${_('Error')}" src="${h.url('/images/icons/info/failure_22.png')}">
         ${_('Case is not linked')}
       </p>
       <br>
       <p>
-          <a href="${h.url_for(controller='/meta', action='search', id=session.get('case').id)}" onclick="return checkModification();" class="button">${_('Link case')}</a>
+          <a href="${h.url(controller='meta', action='search', id=session.get('case').id)}" onclick="return checkModification();" class="button">${_('Link case')}</a>
       </p>
     % endif
   %else:
     <p>
       <strong>${_('State')}:</strong>
-      <img width="22" height="22" alt="${_('Error')}" src="${h.url_for('/images/icons/info/failure_22.png')}">
+      <img width="22" height="22" alt="${_('Error')}" src="${h.url('/images/icons/info/failure_22.png')}">
       ${_('Sychronisation is not allowed. Please set permission for synchronisation before linking')}
     </p>
   %endif
 %else:
   <p>
     <strong>${_('State')}:</strong>
-    <img width="22" height="22" alt="${_('Error')}" src="${h.url_for('/images/icons/info/failure_22.png')}">
+    <img width="22" height="22" alt="${_('Error')}" src="${h.url('/images/icons/info/failure_22.png')}">
     ${_('Meta user is not configured properly. Please consult the administration to do so.')}
   </p>
 %endif

Modified: base/trunk/mpulsweb/templates/meta/search.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/search.mako	2012-03-08 10:08:59 UTC (rev 5874)
+++ base/trunk/mpulsweb/templates/meta/search.mako	2012-03-08 10:13:04 UTC (rev 5875)
@@ -8,7 +8,7 @@
     <p>${h.literal(_('To prevent misuse of the meta-search <u>the meta-account will be disabled after after <strong>%s</strong> more unsuccessful searches</u>. Counter will be reset on successful search or on linking a case.') % str(c.remaining_searches + 1))}</p>
   </div>
 % endif
-<form name="metasearch" action="${h.url_for(controller='meta', action='searchAction')}" method="POST">
+<form name="metasearch" action="${h.url(controller='meta', action='searchAction')}" method="POST">
   <div class="widget container">
     <table>
       <tr>
@@ -84,8 +84,8 @@
       <tr class="${num % 2 and 'table_row_h' or ''}">
         <td>${m["uuid"]}</td>
         <td class="actions">
-          <a href="${h.url_for(controller='meta', action='link', id=m['uuid'], confirmed=0)}">
-            <img src    = "${h.url_for('/images/icons/link_active_22.png')}"
+          <a href="${h.url(controller='meta', action='link', id=m['uuid'], confirmed=0)}">
+            <img src    = "${h.url('/images/icons/link_active_22.png')}"
               border = "0"
               alt    = "${_('Link')}"
               title  = "${_('Link')}"
@@ -112,7 +112,7 @@
   <p><strong>${_('State')}:</strong>${_('Required fields to create a new meta case are not filled out')}</p>
 %else:
   <br>
-  <p><a href="${h.url_for(controller='meta', action='create', id=c.case.id, confirmed=0)}" class="button">${_('Create meta case')}</a></p>
+  <p><a href="${h.url(controller='meta', action='create', id=c.case.id, confirmed=0)}" class="button">${_('Create meta case')}</a></p>
 %endif
 </div>
 % endif

Modified: base/trunk/mpulsweb/templates/meta/statement1.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/statement1.mako	2012-03-08 10:08:59 UTC (rev 5874)
+++ base/trunk/mpulsweb/templates/meta/statement1.mako	2012-03-08 10:13:04 UTC (rev 5875)
@@ -15,9 +15,9 @@
 <meta http-equiv="expires" content="0">
 <link rel="shortcut icon" type="image/x-icon" href="/images/mpuls.ico">
 <link href="/styles/all.css" media="all" rel="stylesheet" type="text/css">
-<link href="${h.url_for('/styles/print.css')}" media="screen" rel="stylesheet" 
+<link href="${h.url('/styles/print.css')}" media="screen" rel="stylesheet" 
       type="text/css">
-<link href="${h.url_for('/styles/print.css')}" media="print" rel="stylesheet" 
+<link href="${h.url('/styles/print.css')}" media="print" rel="stylesheet" 
       type="text/css">
 
 <style type="text/css">

Modified: base/trunk/mpulsweb/templates/meta/statement2.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/statement2.mako	2012-03-08 10:08:59 UTC (rev 5874)
+++ base/trunk/mpulsweb/templates/meta/statement2.mako	2012-03-08 10:13:04 UTC (rev 5875)
@@ -16,9 +16,9 @@
 <meta http-equiv="expires" content="0">
 <link rel="shortcut icon" type="image/x-icon" href="/images/mpuls.ico">
 <link href="/styles/all.css" media="all" rel="stylesheet" type="text/css">
-<link href="${h.url_for('/styles/print.css')}" media="screen" rel="stylesheet" 
+<link href="${h.url('/styles/print.css')}" media="screen" rel="stylesheet" 
       type="text/css">
-<link href="${h.url_for('/styles/print.css')}" media="print" rel="stylesheet" 
+<link href="${h.url('/styles/print.css')}" media="print" rel="stylesheet" 
       type="text/css">
 
 <style type="text/css">

Modified: base/trunk/mpulsweb/templates/meta/unlink.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/unlink.mako	2012-03-08 10:08:59 UTC (rev 5874)
+++ base/trunk/mpulsweb/templates/meta/unlink.mako	2012-03-08 10:13:04 UTC (rev 5875)
@@ -7,5 +7,5 @@
 <div class="widget container">
 <h2>1. ${_('Unlink and delete already uploaded data')}</h2>
 <p>${h.literal(_('The link to the meta case will be deleted. No further syncronisation is possible without relinking the case. Already <strong>transfered data from this case will be deleted in the meta case</strong>, and will not be available for other people.'))}</p>
-<p><a href="${h.url_for(controller='/meta', action='unlink_delete_projectdata', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Unlink and delete')}</a></p>
+<p><a href="${h.url(controller='meta', action='unlink_delete_projectdata', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Unlink and delete')}</a></p>
 </div>



More information about the Mpuls-commits mailing list