[Mpuls-commits] r3371 - in base/trunk: . mpulsweb/lib mpulsweb/templates/casemanagement mpulsweb/templates/formularpage mpulsweb/templates/repeatgroup/dialogs

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 10 21:39:59 CEST 2010


Author: bh
Date: 2010-08-10 21:39:57 +0200 (Tue, 10 Aug 2010)
New Revision: 3371

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/helpers.py
   base/trunk/mpulsweb/templates/casemanagement/main.mako
   base/trunk/mpulsweb/templates/formularpage/formular.mako
   base/trunk/mpulsweb/templates/repeatgroup/dialogs/confirm_delete_rg_entry.mako
Log:
* mpulsweb/lib/helpers.py: Do not import anything from navigation
anymore

* mpulsweb/templates/repeatgroup/dialogs/confirm_delete_rg_entry.mako,
mpulsweb/templates/formularpage/formular.mako,
mpulsweb/templates/casemanagement/main.mako: Explicitly import
get_pagename and render_navigation from navigation instead of
relying on them being in h.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-08-10 17:39:15 UTC (rev 3370)
+++ base/trunk/ChangeLog	2010-08-10 19:39:57 UTC (rev 3371)
@@ -1,5 +1,18 @@
 2010-08-10  Bernhard Herzog  <bh at intevation.de>
 
+	Break some circular imports
+
+	* mpulsweb/lib/helpers.py: Do not import anything from navigation
+	anymore
+
+	* mpulsweb/templates/repeatgroup/dialogs/confirm_delete_rg_entry.mako,
+	mpulsweb/templates/formularpage/formular.mako,
+	mpulsweb/templates/casemanagement/main.mako: Explicitly import
+	get_pagename and render_navigation from navigation instead of
+	relying on them being in h.
+
+2010-08-10  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/navigation.py: Fix order of imports
 
 2010-08-10  Bernhard Herzog  <bh at intevation.de>

Modified: base/trunk/mpulsweb/lib/helpers.py
===================================================================
--- base/trunk/mpulsweb/lib/helpers.py	2010-08-10 17:39:15 UTC (rev 3370)
+++ base/trunk/mpulsweb/lib/helpers.py	2010-08-10 19:39:57 UTC (rev 3371)
@@ -49,7 +49,6 @@
 
 from mpulsweb.lib.security import hasRole, getKAName
 
-from mpulsweb.lib.navigation import get_pagename, render_navigation
 from mpulsweb.lib.helper.filters import shorten, nl_to_br, NA
 
 

Modified: base/trunk/mpulsweb/templates/casemanagement/main.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/main.mako	2010-08-10 17:39:15 UTC (rev 3370)
+++ base/trunk/mpulsweb/templates/casemanagement/main.mako	2010-08-10 19:39:57 UTC (rev 3371)
@@ -1,6 +1,9 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../main.mako" />
-<%!  import mpulsweb.lib.helper.filters as F %>
+<%!
+   import mpulsweb.lib.helper.filters as F
+   from mpulsweb.lib.navigation import render_navigation
+%>
 ${next.body()}
 
 <%def name="buildNavipath()">
@@ -237,7 +240,7 @@
   </div>-->
   <div class="menu">
     <h1>${_('cm_menu_header_structure')}</h1>
-    ${h.literal(h.render_navigation())}
+    ${h.literal(render_navigation())}
   </div>
 </%def>
 

Modified: base/trunk/mpulsweb/templates/formularpage/formular.mako
===================================================================
--- base/trunk/mpulsweb/templates/formularpage/formular.mako	2010-08-10 17:39:15 UTC (rev 3370)
+++ base/trunk/mpulsweb/templates/formularpage/formular.mako	2010-08-10 19:39:57 UTC (rev 3371)
@@ -1,5 +1,9 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="/casemanagement/main.mako"/>
+<%!
+   from mpulsweb.lib.navigation import get_pagename, render_navigation
+%>
+
 ${h.literal(c.formular)}
 
 <%def name="buildNavipath()">
@@ -10,11 +14,11 @@
         % if session.get('render_mode') == 'ro':
 	<li><a href="${h.url_for(controller='/formularpage', action='show',
                                  id=c.page_id)}"
-               onclick="return checkModification();">${h.get_pagename(c.page_id)}</a></li>
+               onclick="return checkModification();">${get_pagename(c.page_id)}</a></li>
         % else:
 	<li><a href="${h.url_for(controller='/formularpage', action='edit',
                                  id=c.page_id)}" 
-               onclick="return checkModification();">${h.get_pagename(c.page_id)}</a></li>
+               onclick="return checkModification();">${get_pagename(c.page_id)}</a></li>
         % endif
 </%def>
 

Modified: base/trunk/mpulsweb/templates/repeatgroup/dialogs/confirm_delete_rg_entry.mako
===================================================================
--- base/trunk/mpulsweb/templates/repeatgroup/dialogs/confirm_delete_rg_entry.mako	2010-08-10 17:39:15 UTC (rev 3370)
+++ base/trunk/mpulsweb/templates/repeatgroup/dialogs/confirm_delete_rg_entry.mako	2010-08-10 19:39:57 UTC (rev 3371)
@@ -1,9 +1,12 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="/casemanagement/main.mako" />
+<%!
+   from mpulsweb.lib.navigation import get_pagename, render_navigation
+%>
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
         <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='/formularpage', action='edit', id=session.get('case').getPageId())}" onclick="return checkModification();">${h.get_pagename(session.get('case').getPageId())}</a></li>
+	<li><a href="${h.url_for(controller='/formularpage', action='edit', id=session.get('case').getPageId())}" onclick="return checkModification();">${get_pagename(session.get('case').getPageId())}</a></li>
 	<li><a href="#">Eintrag löschen</a></li>
 </%def>
 <%include file="../../dialogs/confirm.mako" />



More information about the Mpuls-commits mailing list