[Mpuls-commits] r6027 - base/trunk/mpulsweb/controllers

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 14 14:52:00 CEST 2012


Author: torsten
Date: 2012-08-14 14:52:00 +0200 (Tue, 14 Aug 2012)
New Revision: 6027

Modified:
   base/trunk/mpulsweb/controllers/phase.py
Log:
Show text in phase-change success dialog depending if meta-server is enabled
and the case is linked.


Modified: base/trunk/mpulsweb/controllers/phase.py
===================================================================
--- base/trunk/mpulsweb/controllers/phase.py	2012-08-14 12:50:35 UTC (rev 6026)
+++ base/trunk/mpulsweb/controllers/phase.py	2012-08-14 12:52:00 UTC (rev 6027)
@@ -34,8 +34,7 @@
         c.show_meta_case_hint = (g.mpuls_config.is_enabled('case-module',
                                                            'meta-server')
                                  and case.getMeta().is_linked())
-        if g.mpuls_config.is_enabled('case-module', 'meta-server') \
-        and case.getMeta().is_linked():
+        if c.show_meta_case_hint:
             try:
                 case.getMeta().push()
                 c.show_meta_case_upload_hint =_('The data was sucessfully '
@@ -44,11 +43,16 @@
                 c.show_meta_case_upload_hint = _('Error! Data not uploaded.')
                 self._handle_meta_exception(meta, exc, "push",
                                                _('Error! Data not uploaded.'))
-
         c.dialog_title = _("Phase changed!")
-        c.dialog_text = _("The phase could be changed successfully."
-                          " Please follow the shown steps to reach the phase"
-                          " overview.")
+        if c.show_meta_case_hint:
+            c.dialog_text = _("The phase could be changed successfully and the"
+                              " case has been synced with the Meta-Server."
+                              " Please follow the shown steps to reach the phase"
+                              " overview.")
+        else:
+            c.dialog_text = _("The phase could be changed successfully."
+                              " Please follow the shown steps to reach the phase"
+                              " overview.")
         c.url_ok = h.url(controller='phase', action='overview', id=case.id)
         return render('/phase/dialogs/success_set_phase.mako')
 



More information about the Mpuls-commits mailing list