[Mpuls-commits] r5903 - in jmd/trunk/jmdweb: controllers templates/auth templates/casemanagement templates/settings

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Mon Mar 12 11:13:04 CET 2012


Author: ludwig
Date: 2012-03-12 11:13:04 +0100 (Mon, 12 Mar 2012)
New Revision: 5903

Modified:
   jmd/trunk/jmdweb/controllers/administration.py
   jmd/trunk/jmdweb/templates/auth/main.mako
   jmd/trunk/jmdweb/templates/casemanagement/new.mako
   jmd/trunk/jmdweb/templates/settings/edit.mako
   jmd/trunk/jmdweb/templates/settings/show.mako
Log:
Issue 2738: Replace url_for (jmdweb/templates part2)


Modified: jmd/trunk/jmdweb/controllers/administration.py
===================================================================
--- jmd/trunk/jmdweb/controllers/administration.py	2012-03-12 10:05:00 UTC (rev 5902)
+++ jmd/trunk/jmdweb/controllers/administration.py	2012-03-12 10:13:04 UTC (rev 5903)
@@ -38,7 +38,6 @@
 
 from mpulsweb.lib.db import db
 from mpulsweb.lib.base import BaseController, render, session
-from mpulsweb.lib.helpers import url_for
 from mpulsweb.lib.security import checkRole, getDbName
 from mpulsweb.lib.validators import ValidatorStateObject, NewUserGroupForm, \
     EditUserGroupForm , NewUserForm, EditUserForm, DeleteUserHelperForm

Modified: jmd/trunk/jmdweb/templates/auth/main.mako
===================================================================
--- jmd/trunk/jmdweb/templates/auth/main.mako	2012-03-12 10:05:00 UTC (rev 5902)
+++ jmd/trunk/jmdweb/templates/auth/main.mako	2012-03-12 10:13:04 UTC (rev 5903)
@@ -3,7 +3,7 @@
 <div id="wrapper_login" >
   <div id="header_login">
     <div id="logo_login">
-      <img src="${h.url_for('/images/logos/logo_ka_75.png')}" alt="${_('Logo institution')}" border="0">
+      <img src="${h.url('/images/logos/logo_ka_75.png')}" alt="${_('Logo institution')}" border="0">
     </div>
   </div>
   <div id="content_login">
@@ -12,15 +12,15 @@
   <div id="footer_login">
     <p>${_('BMF-phrase %s') % h.get_app_title()}</p>
      <a target="_blank" href="http://www.bmfsfj.de">
-      <img src="${h.url_for('/images/logos/BMFSFJ_C_M_web.jpg')}" 
+      <img src="${h.url('/images/logos/BMFSFJ_C_M_web.jpg')}" 
         alt="${_('Logo Federal Ministry for Family, Senior Citizens, Women and youth')}" border="0">
     </a>
      <a target="_blank" href="http://www.jugend-staerken.de">
-      <img src="${h.url_for('/images/logos/jugend-staerken.jpg')}" 
+      <img src="${h.url('/images/logos/jugend-staerken.jpg')}" 
         alt="${_('Logo program To encourage the youth')}" border="0">
     </a>
      <a target="_blank" href="http://www.jugendmigrationsdienste.de">
-      <img src="${h.url_for('/images/logos/logo_ka_75.png')}" 
+      <img src="${h.url('/images/logos/logo_ka_75.png')}" 
         alt="${_('Logo Migration Services for Youth')}" border="0">
     </a>
   </div>

Modified: jmd/trunk/jmdweb/templates/casemanagement/new.mako
===================================================================
--- jmd/trunk/jmdweb/templates/casemanagement/new.mako	2012-03-12 10:05:00 UTC (rev 5902)
+++ jmd/trunk/jmdweb/templates/casemanagement/new.mako	2012-03-12 10:13:04 UTC (rev 5903)
@@ -3,13 +3,13 @@
 
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
-  <li><a href="${h.url_for(controller='/case')}">${_('Case Management')}</a></li>
-  <li><a href="${h.url_for(controller='/case', action='new2')}">${_('Create new case')}</a></li>
+  <li><a href="${h.url(controller='case', action='index')}">${_('Case Management')}</a></li>
+  <li><a href="${h.url(controller='case', action='new2')}">${_('Create new case')}</a></li>
 </%def>
 
 <div class="waska_form">
   <form id="waska_form" 
-        action="${h.url_for(controller='/case', action='newAction')}" 
+        action="${h.url(controller='case', action='newAction')}" 
         accept-charset="UTF-8"
         name="waska_form" method="POST">
     <h1>${_('Create new case document')}</h1>
@@ -86,24 +86,24 @@
     ##  <table>
     ##    <tr>
     ##      <td class="table_row_h">
-    ##        Arabisch <a href="${h.url_for('/documents/ee_ar.pdf')}">download</a>
+    ##        Arabisch <a href="${h.url('/documents/ee_ar.pdf')}">download</a>
     ##      </td>
     ##      <td class="table_row_h">
-    ##        Englisch <a href="${h.url_for('/documents/ee_en.pdf')}">download</a>
+    ##        Englisch <a href="${h.url('/documents/ee_en.pdf')}">download</a>
     ##      </td>
     ##    </tr>
     ##    <tr>
-    ##      <td>Polnisch <a href="${h.url_for('/documents/ee_pl.pdf')}">download</a></td>
-    ##      <td>Russisch <a href="${h.url_for('/documents/ee_ru.pdf')}">download</a></td>
+    ##      <td>Polnisch <a href="${h.url('/documents/ee_pl.pdf')}">download</a></td>
+    ##      <td>Russisch <a href="${h.url('/documents/ee_ru.pdf')}">download</a></td>
     ##    </tr>
     ##    <tr>
     ##      <td class="table_row_h">
-    ##        Türkisch <a href="${h.url_for('/documents/ee_tr.pdf')}">download</a>
+    ##        Türkisch <a href="${h.url('/documents/ee_tr.pdf')}">download</a>
     ##      </td>
     ##      <td class="table_row_h">
     ##        Deutsch
     ##        (Einwilligungserklärung ohne Hinweise zu Teilnehmernachweisen)
-    ##        <a href="${h.url_for('/documents/ee_de_ohnetn.pdf')}">download</a>
+    ##        <a href="${h.url('/documents/ee_de_ohnetn.pdf')}">download</a>
     ##      </td>
     ##    </tr>
     ##  </table>

Modified: jmd/trunk/jmdweb/templates/settings/edit.mako
===================================================================
--- jmd/trunk/jmdweb/templates/settings/edit.mako	2012-03-12 10:05:00 UTC (rev 5902)
+++ jmd/trunk/jmdweb/templates/settings/edit.mako	2012-03-12 10:13:04 UTC (rev 5903)
@@ -9,13 +9,13 @@
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
   <li>
-    <a href="${h.url_for(controller='/settings')}">${_('Administration')}</a>
+    <a href="${h.url(controller='settings', action='index')}">${_('Administration')}</a>
   </li>
   <li>
-    <a href="${h.url_for(controller='/settings', action='show')}">${_('Show settings')}</a>
+    <a href="${h.url(controller='settings', action='show')}">${_('Show settings')}</a>
   </li>
   <li>
-    <a href="${h.url_for(controller='/settings', action='edit')}">${_('Edit settings')}</a>
+    <a href="${h.url(controller='settings', action='edit')}">${_('Edit settings')}</a>
   </li>
 </%def>
 
@@ -27,8 +27,7 @@
     <div class="actions">
       <ul>
         <li>
-          <a href="${h.url_for(controller='settings',
-                               action='show')}">
+          <a href="${h.url(controller='settings', action='show')}">
             ${_('Back to: institution settings')}
           </a>
         </li>
@@ -41,7 +40,7 @@
 <div id="admin_edit_settings">
   <p>${_('Edit institution settings.')}</p>
   <div class="waska_form">
-    <form action="${h.url_for(controller='/settings', action='editAction')}" method="POST">
+    <form action="${h.url(controller='settings', action='editAction')}" method="POST">
       <fieldset>
         <legend>${_('Specification for agency')}</legend>
         <div class="waska_form_element w30">
@@ -94,7 +93,7 @@
         <div class="waska_form_element w100">
           % if c.form_errors.get('anon_transfer'):
             <a href="#error_list">
-              <img class="smallicon" alt="" src="${h.url_for('/images/icons/info/failure_22.png')}">
+              <img class="smallicon" alt="" src="${h.url('/images/icons/info/failure_22.png')}">
             </a>
           % endif
           % if c.agency.isAnonTransfer():

Modified: jmd/trunk/jmdweb/templates/settings/show.mako
===================================================================
--- jmd/trunk/jmdweb/templates/settings/show.mako	2012-03-12 10:05:00 UTC (rev 5902)
+++ jmd/trunk/jmdweb/templates/settings/show.mako	2012-03-12 10:13:04 UTC (rev 5903)
@@ -4,10 +4,10 @@
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
   <li>
-    <a href="${h.url_for(controller='/settings')}">${_('Administration')}</a>
+    <a href="${h.url(controller='settings', action='index')}">${_('Administration')}</a>
   </li>
   <li>
-    <a href="${h.url_for(controller='/settings', action='show')}">${_('Show settings')}</a>
+    <a href="${h.url(controller='settings', action='show')}">${_('Show settings')}</a>
   </li>
 </%def>
 
@@ -19,7 +19,7 @@
     <div class="actions">
       <ul>
 	<li>
-          <a href="${h.url_for(controller='/settings', action='edit')}"> 
+          <a href="${h.url(controller='settings', action='edit')}"> 
             ${_('Edit settings')}
           </a>
         </li>



More information about the Mpuls-commits mailing list