[Mpuls-commits] r5904 - in jmd/trunk/jmdstrukturweb/templates: . auth casemanagement home

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Mon Mar 12 11:24:15 CET 2012


Author: ludwig
Date: 2012-03-12 11:24:15 +0100 (Mon, 12 Mar 2012)
New Revision: 5904

Modified:
   jmd/trunk/jmdstrukturweb/templates/auth/main.mako
   jmd/trunk/jmdstrukturweb/templates/casemanagement/caselist.mako
   jmd/trunk/jmdstrukturweb/templates/casemanagement/new.mako
   jmd/trunk/jmdstrukturweb/templates/home/remindlist.mako
   jmd/trunk/jmdstrukturweb/templates/main.mako
Log:
Issue2738: Replace url_for (jmdstruktur/templates part1)


Modified: jmd/trunk/jmdstrukturweb/templates/auth/main.mako
===================================================================
--- jmd/trunk/jmdstrukturweb/templates/auth/main.mako	2012-03-12 10:13:04 UTC (rev 5903)
+++ jmd/trunk/jmdstrukturweb/templates/auth/main.mako	2012-03-12 10:24:15 UTC (rev 5904)
@@ -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 Einrichtung" border="0">
+      <img src="${h.url('/images/logos/logo_ka_75.png')}" alt="Logo Einrichtung" border="0">
     </div>
   </div>
   <div id="content_login">
@@ -12,15 +12,15 @@
   <div id="footer_login">
     <p>${_('BMF-phrase %s')}</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 Bundesministerium für Familie, Senioren, Frauen und Jugend" 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 Programm 'Jugend Stärken'" 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 Jugendmigrationsdienste" border="0">
     </a>
   </div>

Modified: jmd/trunk/jmdstrukturweb/templates/casemanagement/caselist.mako
===================================================================
--- jmd/trunk/jmdstrukturweb/templates/casemanagement/caselist.mako	2012-03-12 10:13:04 UTC (rev 5903)
+++ jmd/trunk/jmdstrukturweb/templates/casemanagement/caselist.mako	2012-03-12 10:24:15 UTC (rev 5904)
@@ -40,29 +40,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='case_overview', action='overview',
+        <a href="${h.url(controller='case_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='case_overview', action='overview',
+        <a href="${h.url(controller='case_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
@@ -86,7 +86,7 @@
   % for title, urlpart, style, roles, get_value in fields:
     % if h.hasRole(roles):
       % if case.getState().getState() != 5:
-        <td><a href="${h.url_for(controller='/case', action='select',
+        <td><a href="${h.url(controller='case', action='select',
                                  id=case.id, confirmed=0)}">${get_value(case) | F.NA}</a></td>
       % else:
         <td>${get_value(case) | F.NA}</td>
@@ -108,7 +108,7 @@
 <%def name="get_validity_icon(case)">
   % for validity in g.mpuls_config.get('validities', 'enabled'):
     % if validity['id'] == case.getValidity():  
-      <img src="${h.url_for('/images/icons/%s' % validity['icon'])}" alt="${validity['name']}" title="${validity['name']}" width="22" height="22">
+      <img src="${h.url('/images/icons/%s' % validity['icon'])}" alt="${validity['name']}" title="${validity['name']}" width="22" height="22">
     % endif
   % endfor
 </%def>
@@ -117,7 +117,7 @@
   <% phase = case.getState().getPhase() %>
   <% running = not phase%2 and 'running' or 'finished' %>
   <% description = h.literal(c.phases.get_phase(str(phase)).getDescription())%>
-  <img src="${h.url_for(str('/images/icons/case_status/%s_%s.png' % (description[0].lower(), running)) )}" alt="${description}" title="${description}" width="22" height="22">
+  <img src="${h.url(str('/images/icons/case_status/%s_%s.png' % (description[0].lower(), running)) )}" alt="${description}" title="${description}" width="22" height="22">
 </%def>
 
 <%def name="render_phase_legend()">
@@ -128,10 +128,10 @@
     ${legend.append("%s: %s" % (g.mpuls_config.get('phases', 'shortdescription')[0][p.id], p.getDescription()))}
   % endfor
   ${h.literal(", ".join(legend))}
-  | <span style="background-image:url('${h.url_for("/images/icons/phase-running-22.png")}'); background-repeat:no-repeat; background-position:1px -2px">
+  | <span style="background-image:url('${h.url("/images/icons/phase-running-22.png")}'); background-repeat:no-repeat; background-position:1px -2px">
       (   )
     </span>: ${_("Running")},
-    <span style="background-image:url('${h.url_for("/images/icons/phase-stop-22.png")}'); background-repeat:no-repeat; background-position:1px -2px">
+    <span style="background-image:url('${h.url("/images/icons/phase-stop-22.png")}'); background-repeat:no-repeat; background-position:1px -2px">
       (   )
     </span>: ${_("Finished")}
 </div>
@@ -141,14 +141,14 @@
 <%def name="get_state_icon(case)">
   % if h.hasRole(['cm']) and g.mpuls_config.is_enabled('case-module', 'organisation'):
     % if str(case.getEditor().id) == str(session.get('USER_AUTHORIZED').id):
-      <img src    = "${h.url_for('/images/icons/edit_editor.png')}"
+      <img src    = "${h.url('/images/icons/edit_editor.png')}"
            border = "0"
            alt    = "${_('Editor')}"
            title  = "${_('Editor')}"
            width  = "22"
            height = "22">
     % else:
-      <img src    = "${h.url_for('/images/icons/edit_editors_22.png')}"
+      <img src    = "${h.url('/images/icons/edit_editors_22.png')}"
            border = "0"
            alt    = "${_('Standin')}"
            title  = "${_('Standin')}"
@@ -157,28 +157,28 @@
     % endif
   % endif
   % if case.getState().getState() in (1,2):
-    <img src    = "${h.url_for('/images/icons/edit_22.png')}"
+    <img src    = "${h.url('/images/icons/edit_22.png')}"
          border = "0"
          alt    = "${_('Editable')}"
          title  = "${_('Editable')}"
          width  = "22"
          height = "22">
   % elif case.getState().getState() == 3:
-    <img src    = "${h.url_for('/images/icons/delete_inactive_22.png')}"
+    <img src    = "${h.url('/images/icons/delete_inactive_22.png')}"
          border = "0"
          alt    = "${_('Mark delete')}"
          title  = "${_('Mark delete')}"
          width  = "22"
          height = "22">
   % elif case.getState().getState() == 4:
-    <img src    = "${h.url_for('/images/icons/anonymise_inactive_22.png')}"
+    <img src    = "${h.url('/images/icons/anonymise_inactive_22.png')}"
          border = "0"
          alt    = "${_('Mark anonym')}"
          title  = "${_('Mark anonym')}"
          width  = "22"
          height = "22">
   % elif case.getState().getState() == 5:
-    <img src    = "${h.url_for('/images/icons/anonymise_inactive_22.png')}"
+    <img src    = "${h.url('/images/icons/anonymise_inactive_22.png')}"
          border = "0"
          alt    = "${_('Make anonymousym')}"
          title  = "${_('Make anonymousym')}"
@@ -189,9 +189,9 @@
 
 <%def name="get_actions(case)">
   % if case.getState().getState() != 5:
-    <a href="${h.url_for(controller='case', action='select', id=case.id,
+    <a href="${h.url(controller='case', action='select', id=case.id,
                          confirmed=0)}">
-      <img src    = "${h.url_for('/images/icons/open_active_22.png')}"
+      <img src    = "${h.url('/images/icons/open_active_22.png')}"
            border = "0"
            alt    = "${_('Show')}"
            title  = "${_('Show')}"
@@ -200,9 +200,9 @@
   % endif
   % if h.hasRole(['admin']):
     % if case.getState().getState() in (3, 5):
-      <a href="${h.url_for(controller='case', action='delete', id=case.id,
+      <a href="${h.url(controller='case', action='delete', id=case.id,
                            confirmed=0)}">
-        <img src    = "${h.url_for('/images/icons/delete_active_22.png')}"
+        <img src    = "${h.url('/images/icons/delete_active_22.png')}"
              border = "0"
              alt    = "${_('Delete case')}"
              title  = "${_('Delete case')}"
@@ -211,9 +211,9 @@
     % endif
     % if case.getState().getState() == 4:
       % if g.mpuls_config.is_enabled('case-module', 'anonymize'):
-        <a href="${h.url_for(controller='case', action='anonymize', id=case.id,
+        <a href="${h.url(controller='case', action='anonymize', id=case.id,
                              confirmed=0)}">
-          <img src    = "${h.url_for('/images/icons/anonymise_active_22.png')}"
+          <img src    = "${h.url('/images/icons/anonymise_active_22.png')}"
                border = "0"
                alt    = "${_('Anonymize case document')}"
                title  = "${_('Anonymize case document')}"
@@ -222,9 +222,9 @@
       % endif
     % endif
     % if case.getState().getState() in (3, 4):
-      <a href="${h.url_for(controller='case', action='restore', id=case.id, 
+      <a href="${h.url(controller='case', action='restore', id=case.id, 
                            confirmed=0)}">
-        <img src    = "${h.url_for('/images/icons/refresh_active_22.png')}" 
+        <img src    = "${h.url('/images/icons/refresh_active_22.png')}" 
              border = "0"
              alt    = "${_('Restore case document')}"
              title  = "${_('Restore case document')}"
@@ -233,19 +233,19 @@
     % endif
   % elif h.hasRole(['cm']) and case.getState().getState() in (1, 2):
     % if g.mpuls_config.is_enabled('case-module', 'anonymize'):
-      <a href="${h.url_for(controller='case', 
+      <a href="${h.url(controller='case', 
                            action='markForAnonymizeFromOverview', id=case.id,
                            confirmed=0)}">
-        <img src    = "${h.url_for('/images/icons/anonymise_active_22.png')}" 
+        <img src    = "${h.url('/images/icons/anonymise_active_22.png')}" 
              border = "0"
              alt    = "${_('Anonymize case document')}"
              title  = "${_('Anonymize case document')}"
              width  = "22"
              height = "22"></a>
     % endif
-    <a href="${h.url_for(controller='case', action='markForDelete', id=case.id,
+    <a href="${h.url(controller='case', action='markForDelete', id=case.id,
                          confirmed=0)}">
-      <img src    = "${h.url_for('/images/icons/delete_active_22.png')}" 
+      <img src    = "${h.url('/images/icons/delete_active_22.png')}" 
            border = "0"
            alt    = "${_('Delete')}"
            title  = "${_('Delete')}"

Modified: jmd/trunk/jmdstrukturweb/templates/casemanagement/new.mako
===================================================================
--- jmd/trunk/jmdstrukturweb/templates/casemanagement/new.mako	2012-03-12 10:13:04 UTC (rev 5903)
+++ jmd/trunk/jmdstrukturweb/templates/casemanagement/new.mako	2012-03-12 10:24:15 UTC (rev 5904)
@@ -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')}">${_('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='index')}">${_('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>Neue JMD-Statistik anlegen</h1>

Modified: jmd/trunk/jmdstrukturweb/templates/home/remindlist.mako
===================================================================
--- jmd/trunk/jmdstrukturweb/templates/home/remindlist.mako	2012-03-12 10:13:04 UTC (rev 5903)
+++ jmd/trunk/jmdstrukturweb/templates/home/remindlist.mako	2012-03-12 10:24:15 UTC (rev 5904)
@@ -1,8 +1,8 @@
 <%inherit file="/appointments/remindlist_body.mako" />
 <%def name="showAppointmentActions(appointment)">
-  <a href="${h.url_for(controller='/case', action='select',
+  <a href="${h.url(controller='case', action='select',
                        id=appointment.case_id, confirmed=0)}">
-    <img src    = "${h.url_for('/images/icons/open_active_22.png')}"
+    <img src    = "${h.url('/images/icons/open_active_22.png')}"
          alt    = "${_('Show')}" 
          title  = "${_('Show')}"
          width  = "22"
@@ -10,10 +10,10 @@
 </%def>
 
 <%def name="showKeepActiveActions(appointment)">
-  <a href="${h.url_for(controller='/case', action='new')}">
-    <img src    = "${h.url_for('/images/icons/new_22.png')}"
+  <a href="${h.url(controller='case', action='new')}">
+    <img src    = "${h.url('/images/icons/new_22.png')}"
          width  = "22"
          height = "22"
          alt    = "${_('New case document')}"
          title  = "${_('New case document')}"></a>
-</%def>
\ No newline at end of file
+</%def>

Modified: jmd/trunk/jmdstrukturweb/templates/main.mako
===================================================================
--- jmd/trunk/jmdstrukturweb/templates/main.mako	2012-03-12 10:13:04 UTC (rev 5903)
+++ jmd/trunk/jmdstrukturweb/templates/main.mako	2012-03-12 10:24:15 UTC (rev 5904)
@@ -24,18 +24,18 @@
   <div id="startmenu">
     <ul>
       <li>
-        <a href="${h.url_for(controller='/')}"
+        <a href="${h.url('/')}"
            onclick="return checkModification();">
           ${_('Black board')}
         </a>
       </li>
       <li>
-          <a href="${h.url_for(controller='/help')}"
+          <a href="${h.url(controller='help', action='index')}"
            onclick="return checkModification();">
            ${_('Help')}</a>
       </li>
       <li>
-        <a href="${h.url_for(controller='/auth', action='logout')}"
+        <a href="${h.url(controller='auth', action='logout')}"
            onclick="return checkModification();">
           ${_('Logout')}</a>
       </li>
@@ -44,7 +44,7 @@
 </%def>
 
 <%def name="buildNavipath()">
-  <li><a href="${h.url_for(controller='/')}"
+  <li><a href="${h.url('/')}"
          onclick="return checkModification();">${_('%s Start') % h.get_app_title()}</a></li>
 </%def>
 
@@ -66,14 +66,14 @@
           <h1>${_('%s Start') % h.get_app_title()}</h1>
           <ul>
             <li>
-              <a href="${h.url_for(controller='/')}">
+              <a href="${h.url('/')}">
                 ${_('Black board')}
               </a>
             </li>
             ## APPOINTMENTS 
             % if g.mpuls_config.is_enabled('module', 'appointments'):
               <li>
-                <a href="${h.url_for(controller='/appointment',
+                <a href="${h.url(controller='appointment',
                                      action='overview')}">
                   ${_('Events')}
                 </a>
@@ -82,7 +82,7 @@
             ## DOCUMENTS
             % if g.mpuls_config.is_enabled('module', 'documents'):
               <li>
-                <a href="${h.url_for(controller='/document', 
+                <a href="${h.url(controller='document', 
                                      action='globalOverview')}">
                   ${_('Documents')}
                 </a>
@@ -98,20 +98,20 @@
           <h1>${_('Case Management')}</h1>
           <ul>
             <li>
-              <a href="${h.url_for(controller='/case_overview',
+              <a href="${h.url(controller='case_overview',
                                    action='overview')}">
                 ${_('Case documents	')}
               </a>
             </li>
             % if h.hasRole(['cm']):
               <li>
-                <a href="${h.url_for(controller='/case', action='new')}">
+                <a href="${h.url(controller='case', action='new')}">
                   ${_('New case document')}
                 </a> 
               </li>
               % if g.mpuls_config.is_enabled('case-module', 'import'):
                 <li>
-                  <a href="${h.url_for(controller='/case', action='importCase')}">
+                  <a href="${h.url(controller='case', action='importCase')}">
                     ${_('Import case document')}
                   </a>
                 </li>
@@ -127,7 +127,7 @@
           <h1>${_('Overview')}</h1>
             <ul>
               <li>
-                <a href="${h.url_for(controller='/evaluation_overview', action='index')}">
+                <a href="${h.url(controller='evaluation_overview', action='index')}">
                   ${_('Agency')}
                 </a>
               </li>
@@ -156,7 +156,7 @@
   <ul>
     % for eval in g.mpuls_config.get('evaluations', 'enabled'): 
       <li>
-        <a href="${h.url_for(controller='/evaluate', action='evaluate',
+        <a href="${h.url(controller='evaluate', action='evaluate',
                              id=eval.get('id'))}">${eval.get('name')}</a>
       </li>
     % endfor
@@ -180,7 +180,7 @@
 <%def name="buildFooter()">
   <div id="footer">
     <div id="version_str">
-    <a href="${h.url_for(controller='/info')}"
+    <a href="${h.url(controller='info', action='index')}"
            onclick="return checkModification();">
           ${_('Info')}</a>
       | ${g.mpuls_config.get_app_name()}
@@ -220,9 +220,9 @@
 </span>
 <div id="header">
   <div class="left" id="logo">
-    <a href="${h.url_for(controller='/')}"
+    <a href="${h.url('/')}"
        onclick="return checkModification();">
-      <img src="${h.url_for('/images/logos/logo_ka_75.png')}" 
+      <img src="${h.url('/images/logos/logo_ka_75.png')}" 
            alt="Logo Einrichtung" border="0">
     </a>
   </div>



More information about the Mpuls-commits mailing list