[Mpuls-commits] r5347 - in base/trunk/mpulsweb: controllers templates/phase/dialogs

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Sep 15 16:13:22 CEST 2011


Author: bh
Date: 2011-09-15 16:13:22 +0200 (Thu, 15 Sep 2011)
New Revision: 5347

Modified:
   base/trunk/mpulsweb/controllers/phase.py
   base/trunk/mpulsweb/templates/phase/dialogs/success_set_phase.mako
Log:
Improve name of context variable that controls showing the meta-server
hint in the phase success dialog. Whether the hint is to be shown does
not only depend on whether the case is linked, now, it also depends on
whether meta-case support is enabled at all, for instance. Also, for the
template it doesn't really matter whether the case is linked to a
meta-case. It's more important whether the meta-server sync hint is to
be shown or not. So the more generic new c.show_meta_case_hint fits
better than the old c.case_is_linked.


Modified: base/trunk/mpulsweb/controllers/phase.py
===================================================================
--- base/trunk/mpulsweb/controllers/phase.py	2011-09-15 13:47:08 UTC (rev 5346)
+++ base/trunk/mpulsweb/controllers/phase.py	2011-09-15 14:13:22 UTC (rev 5347)
@@ -36,9 +36,9 @@
         case.setPhase(value)
 
         # After setting the phase. Show print-dialog
-        c.case_is_linked = (g.mpuls_config.is_enabled('case-module',
-                                                      'meta-server')
-                            and case.getMeta().is_linked())
+        c.show_meta_case_hint = (g.mpuls_config.is_enabled('case-module',
+                                                           'meta-server')
+                                 and case.getMeta().is_linked())
         c.dialog_title = SET_PHASE_NOTIFICATION_SUCCESS
         c.dialog_text = SET_PHASE_NOTIFICATION_TEXT_SUCCESS
         c.url_ok = h.url_for(controller='/phase', action='overview', id=case.id)

Modified: base/trunk/mpulsweb/templates/phase/dialogs/success_set_phase.mako
===================================================================
--- base/trunk/mpulsweb/templates/phase/dialogs/success_set_phase.mako	2011-09-15 13:47:08 UTC (rev 5346)
+++ base/trunk/mpulsweb/templates/phase/dialogs/success_set_phase.mako	2011-09-15 14:13:22 UTC (rev 5347)
@@ -11,7 +11,7 @@
   <p>${c.dialog_text | F.NA}</p>
   <div class="import_box_dialog">
     <ol>
-      % if c.case_is_linked:
+      % if c.show_meta_case_hint:
       <li>
         ${_('It is strongly recommended to sync the case with its meta-case after changing the phase as this is a significant change in the support of the client. Please open the meta-case to sync the updated case to the meta-server.')}<br>
         <a class="button import" href="${h.url_for(controller='/meta', action='index', id=session.get('case').id)}" target="_blank">${_('Meta case')}</a>



More information about the Mpuls-commits mailing list