[Mpuls-commits] r2746 - in base/trunk: . mpulsweb/templates/documents mpulsweb/templates/documents/dialogs

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


Author: bh
Date: 2010-05-25 20:26:58 +0200 (Tue, 25 May 2010)
New Revision: 2746

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/templates/documents/case_new.mako
   base/trunk/mpulsweb/templates/documents/case_overview.mako
   base/trunk/mpulsweb/templates/documents/dialogs/confirm.mako
   base/trunk/mpulsweb/templates/documents/dialogs/delete_attachment_success.mako
   base/trunk/mpulsweb/templates/documents/dialogs/delete_document_success.mako
   base/trunk/mpulsweb/templates/documents/dialogs/failed_attachment.mako
   base/trunk/mpulsweb/templates/documents/dialogs/failed_document.mako
   base/trunk/mpulsweb/templates/documents/dialogs/success_attachment.mako
   base/trunk/mpulsweb/templates/documents/dialogs/success_documents.mako
   base/trunk/mpulsweb/templates/documents/global_overview.mako
   base/trunk/mpulsweb/templates/documents/global_upload.mako
Log:
* mpulsweb/templates/documents/case_new.mako,
mpulsweb/templates/documents/case_overview.mako,
mpulsweb/templates/documents/dialogs/confirm.mako,
mpulsweb/templates/documents/dialogs/delete_attachment_success.mako,
mpulsweb/templates/documents/dialogs/delete_document_success.mako,
mpulsweb/templates/documents/dialogs/failed_attachment.mako,
mpulsweb/templates/documents/dialogs/failed_document.mako,
mpulsweb/templates/documents/dialogs/success_attachment.mako,
mpulsweb/templates/documents/dialogs/success_documents.mako,
mpulsweb/templates/documents/global_overview.mako,
mpulsweb/templates/documents/global_upload.mako: Use h.url_for
consistently for all-intra application URLs.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/ChangeLog	2010-05-25 18:26:58 UTC (rev 2746)
@@ -1,5 +1,20 @@
 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,
+	mpulsweb/templates/documents/dialogs/delete_attachment_success.mako,
+	mpulsweb/templates/documents/dialogs/delete_document_success.mako,
+	mpulsweb/templates/documents/dialogs/failed_attachment.mako,
+	mpulsweb/templates/documents/dialogs/failed_document.mako,
+	mpulsweb/templates/documents/dialogs/success_attachment.mako,
+	mpulsweb/templates/documents/dialogs/success_documents.mako,
+	mpulsweb/templates/documents/global_overview.mako,
+	mpulsweb/templates/documents/global_upload.mako: Use h.url_for
+	consistently for all-intra application URLs.
+
+2010-05-25  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/templates/dialogs/confirm.mako,
 	mpulsweb/templates/dialogs/failed.mako,
 	mpulsweb/templates/dialogs/notification.mako,

Modified: base/trunk/mpulsweb/templates/documents/case_new.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/case_new.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/case_new.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -3,17 +3,17 @@
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
   <li>
-    <a href="/case/select/${session.get('case').id}/1">
+    <a href="${h.url_for(controller='/case', action='select', id=session.get('case').id, confirmed=1)}">
       ${_('cm_np_select')}
     </a>
   </li>
   <li>
-    <a href="/casedocument/index/${session.get('case').id}">
+    <a href="${h.url_for(controller='/casedocument', action='index', id=session.get('case').id)}">
       ${_('cm_np_doc_overview')}
     </a>
   </li>
   <li>
-    <a href="/casedocument/new">
+    <a href="${h.url_for(controller='/casedocument', action='new')}">
       ${_('cm_np_doc_upload')}
     </a>
   </li>
@@ -27,7 +27,7 @@
     <div class="actions">
       <ul>
 	<li>
-          <a href="/casedocument/index/${session.get('case').id}">
+          <a href="${h.url_for(controller='/casedocument', action='index', id=session.get('case').id)}">
             ${_('cm_menu_link_document_back')}
           </a>
         </li>

Modified: base/trunk/mpulsweb/templates/documents/case_overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/case_overview.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/case_overview.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -3,12 +3,12 @@
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
   <li>
-    <a href="/case/select/${session.get('case').id}/1">
+    <a href="${h.url_for(controller='/case', action='select', id=session.get('case').id, confirmed=1)}">
       ${_('cm_np_select')}
     </a>
   </li>
   <li>
-    <a href="/casedocument/index/${session.get('case').id}">
+    <a href="${h.url_for(controller='/casedocument', action='index', id=session.get('case').id)}">
       ${_('cm_np_doc_overview')}
     </a>
   </li>
@@ -22,7 +22,7 @@
     <div id="modusfield">
       <div class="actions">
 	<ul>
-	  <li><a href="/casedocument/new/">${_('cm_actions_link_doc_new')}</a></li>
+	  <li><a href="${h.url_for(controller='/casedocument', action='new')}">${_('cm_actions_link_doc_new')}</a></li>
 	</ul>
       </div>
     </div>
@@ -51,13 +51,13 @@
         <td>${ f.getName() | F.shorten}</td>
         <td class="number_field">${kb(f.size)} KB</td>
         <td class="actions">
-          <a href="/casedocument/show/${f.id}/${f.getName()}" 
+          <a href="${h.url_for(controller='/casedocument', action='show', id=f.id, url=f.getName())}" 
           target="_blank">
-            <img src="/images/icons/open_active_22.png" border="0" 
+            <img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" 
             alt="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>
           % if h.hasRole(['cm_ka']):
-            <a href="/casedocument/delete/${f.id}/0">
-              <img src="/images/icons/delete_active_22.png" border="0" 
+            <a href="${h.url_for(controller='/casedocument', action='delete', id=f.id, confirmed=0)}">
+              <img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" 
               alt="${_('cm_overview_a_delete')}" 
               title="${_('cm_overview_a_delete')}">
             </a>

Modified: base/trunk/mpulsweb/templates/documents/dialogs/confirm.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/dialogs/confirm.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/dialogs/confirm.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -1,7 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-	<li><a href="/document/overview">${_('doc_np_overview')}</a></li>
+	<li><a href="${h.url_for(controller='/document', action='overview')}">${_('doc_np_overview')}</a></li>
 	<li><a href="#">${_('doc_np_delete')}</a></li>
 </%def>
 <%include file="../../dialogs/confirm.mako" />

Modified: base/trunk/mpulsweb/templates/documents/dialogs/delete_attachment_success.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/dialogs/delete_attachment_success.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/dialogs/delete_attachment_success.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -1,8 +1,8 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-        <li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
-	<li><a href="/casedocument/index/${session.get('case').id}">${_('cm_np_doc_overview')}</a></li>
+        <li><a href="${h.url_for(controller='/case', action='select', id=session.get('case').id, confirmed=1)}">${_('cm_np_select')}</a></li>
+	<li><a href="${h.url_for(controller='/casedocument', action='index', id=session.get('case').id)}">${_('cm_np_doc_overview')}</a></li>
 	<li><a href="#">${_('cm_np_delete_attachment_success')}</a></li>
 </%def>
 <%include file="../../dialogs/success.mako" />

Modified: base/trunk/mpulsweb/templates/documents/dialogs/delete_document_success.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/dialogs/delete_document_success.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/dialogs/delete_document_success.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -1,7 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-        <li><a href="/document/globalOverview">${_('doc_np_overview')}</a></li>
+        <li><a href="${h.url_for(controller='/document', action='globalOverview')}">${_('doc_np_overview')}</a></li>
 	<li><a href="#">${_('cm_np_delete_document_success')}</a></li>
 </%def>
 <%include file="../../dialogs/success.mako" />

Modified: base/trunk/mpulsweb/templates/documents/dialogs/failed_attachment.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/dialogs/failed_attachment.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/dialogs/failed_attachment.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -1,8 +1,8 @@
 <%inherit file="../../casemanagement/main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-        <li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
-	<li><a href="/casedocument/index/${session.get('case').id}">${_('cm_np_doc_overview')}</a></li>
+        <li><a href="${h.url_for(controller='/case', action='select', id=session.get('case').id, confirmed=1)}">${_('cm_np_select')}</a></li>
+	<li><a href="${h.url_for(controller='/casedocument', action='index', id=session.get('case').id)}">${_('cm_np_doc_overview')}</a></li>
 	<li><a href="#">${_('cm_np_doc_failed')}</a></li>
 </%def>
 <%include file="../../dialogs/failed.mako" />

Modified: base/trunk/mpulsweb/templates/documents/dialogs/failed_document.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/dialogs/failed_document.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/dialogs/failed_document.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -1,8 +1,8 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-        <li><a href="/document/globalOverview">${_('doc_np_overview')}</a></li>
-	<li><a href="/document/globalUpload">${_('doc_np_upload')}</a></li>
+        <li><a href="${h.url_for(controller='/document', action='globalOverview')}">${_('doc_np_overview')}</a></li>
+	<li><a href="${h.url_for(controller='/document', action='globalUpload')}">${_('doc_np_upload')}</a></li>
 	<li><a href="#">${_('cm_np_doc_failed')}</a></li>
 </%def>
 <%include file="../../dialogs/failed.mako" />

Modified: base/trunk/mpulsweb/templates/documents/dialogs/success_attachment.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/dialogs/success_attachment.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/dialogs/success_attachment.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -1,7 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()} 
-        <li><a href="/casedocument/index/${session.get('case').id}">${_('cm_np_att_overview')}</a></li>
+        <li><a href="${h.url_for(controller='/casedocument', action='index', id=session.get('case').id)}">${_('cm_np_att_overview')}</a></li>
 	<li><a href="#">${_('cm_np_attachment_success')}</a></li>
 </%def>
 <%include file="../../dialogs/success.mako" />

Modified: base/trunk/mpulsweb/templates/documents/dialogs/success_documents.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/dialogs/success_documents.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/dialogs/success_documents.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -1,8 +1,8 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-        <li><a href="/document/globalOverview">${_('doc_np_overview')}</a></li>
-	<li><a href="/document/globalUpload">${_('doc_np_upload')}</a></li>
+        <li><a href="${h.url_for(controller='/document', action='globalOverview')}">${_('doc_np_overview')}</a></li>
+	<li><a href="${h.url_for(controller='/document', action='globalUpload')}">${_('doc_np_upload')}</a></li>
 	<li><a href="#">${_('cm_np_doc_success')}</a></li>
 </%def>
 <%include file="../../dialogs/success.mako" />

Modified: base/trunk/mpulsweb/templates/documents/global_overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/global_overview.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/global_overview.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -3,7 +3,7 @@
 <%!  import mpulsweb.lib.helper.filters as F %>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/document/globalOverview">${_('doc_np_overview')}</a></li>
+	<li><a href="${h.url_for(controller='/document', action='globalOverview')}">${_('doc_np_overview')}</a></li>
 </%def>
 <div id="content_header_small">
   <div id="content_ueberschrift">
@@ -13,7 +13,7 @@
   <div id="modusfield">
     <div class="actions">
         <ul>
-            <li><a href="/document/globalUpload/"> ${_('doc_actions_link_new')}</a></li>
+            <li><a href="${h.url_for(controller='/document', action='globalUpload')}"> ${_('doc_actions_link_new')}</a></li>
         </ul>
     </div>
 
@@ -34,16 +34,16 @@
   % if idset==0:
   <tr>
     <td>
-        <a href="/document/globalShow/${f.id}/${f.getName()}" target="_blank">${ f.getName() | F.shorten}</a>
+        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" target="_blank">${ f.getName() | F.shorten}</a>
     </td>
     <td class="number_field">
         ${kb(f.size)} KB
     </td>
     <td class="table_action">
-        <a href="/document/globalShow/${f.id}/${f.getName()}" target="_blank"><img src="/images/icons/open_active_22.png" border="0" alt="${_('cm_overview_a_show')}" 
+        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" target="_blank"><img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" alt="${_('cm_overview_a_show')}" 
         title="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>
         % if h.hasRole(['admin_ka']):
-        <a href="/document/globalDelete/${f.id}"><img src="/images/icons/delete_active_22.png" border="0" alt="${_('cm_overview_a_delete')}" title="${_('cm_overview_a_delete')}"></a>
+        <a href="${h.url_for(controller='/document', action='globalDelete', id=f.id)}"><img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" alt="${_('cm_overview_a_delete')}" title="${_('cm_overview_a_delete')}"></a>
         % endif
     </td>
   </tr>
@@ -51,16 +51,16 @@
   % else:
     <tr  class="table_row_h">
       <td>
-        <a href="/document/globalShow/${f.id}/${f.getName()}" target="_blank">${ f.getName() | F.shorten}</a>
+        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" target="_blank">${ f.getName() | F.shorten}</a>
       </td>
       <td class="number_field">
         ${kb(f.size)} KB
       </td>
       <td class="table_action">
-        <a href="/document/globalShow/${f.id}/${f.getName()}" target="_blank"><img src="/images/icons/open_active_22.png" border="0" alt="${_('cm_overview_a_show')}" 
+        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" target="_blank"><img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" alt="${_('cm_overview_a_show')}" 
         title="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>
         % if h.hasRole(['admin_ka']):
-          <a href="/document/globalDelete/${f.id}"><img src="/images/icons/delete_active_22.png" border="0" alt="${_('cm_overview_a_delete')}" title="${_('cm_overview_a_delete')}"></a>
+          <a href="${h.url_for(controller='/document', action='globalDelete', id=f.id)}"><img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" alt="${_('cm_overview_a_delete')}" title="${_('cm_overview_a_delete')}"></a>
         % endif
       </td>
     </tr>

Modified: base/trunk/mpulsweb/templates/documents/global_upload.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/global_upload.mako	2010-05-25 18:13:32 UTC (rev 2745)
+++ base/trunk/mpulsweb/templates/documents/global_upload.mako	2010-05-25 18:26:58 UTC (rev 2746)
@@ -2,8 +2,8 @@
 <%inherit file="../main.mako" />
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
-  <li><a href="/document/globalOverview">${_('doc_np_overview')}</a></li>
-  <li><a href="/document/globalUpload">${_('doc_np_upload')}</a></li>
+  <li><a href="${h.url_for(controller='/document', action='globalOverview')}">${_('doc_np_overview')}</a></li>
+  <li><a href="${h.url_for(controller='/document', action='globalUpload')}">${_('doc_np_upload')}</a></li>
 </%def>
 
 <div id="content_header_small">



More information about the Mpuls-commits mailing list