[Mpuls-commits] r1818 - wasko/branches/2.0/jmdweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 25 17:55:49 CET 2010


Author: torsten
Date: 2010-02-25 17:55:49 +0100 (Thu, 25 Feb 2010)
New Revision: 1818

Modified:
   wasko/branches/2.0/jmdweb/controllers/case.py
Log:
* jmdweb/controllers/case.py
(CaseController.markForAnonymizeFromOverview): Deleted. Implemented in
mpulsbase now.


Modified: wasko/branches/2.0/jmdweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/jmdweb/controllers/case.py	2010-02-25 16:54:47 UTC (rev 1817)
+++ wasko/branches/2.0/jmdweb/controllers/case.py	2010-02-25 16:55:49 UTC (rev 1818)
@@ -281,42 +281,4 @@
                                           auto_insert_errors=False,
                                           errors=c.form_errors)
 
-    @checkRole('cm_ka')
-    def markForAnonymizeFromOverview(self, id, confirmed):
-        try:
-            id = self._checkInt(id)
-            confirmed = self._checkBool(confirmed)
-            case = self._loadCase(id)
-            # Check if the case is in a consistent state (all required fields
-            # are filled)
-            if ((not case.getState().phasesAreConsistent()
-                 or not case.getState().phasesAreCompleted())
-                and case.isYoungerThan(INCONSISTENCY_CHECK_AFTER)):
-                c.notification_for = MARKANONYMIZE_INCOMPLETE_PHASE_FAILED
-                if case.getState().getPhase() in (CLEAR_START, CLEAR_ENDE):
-                    c.notification_text = \
-                                MARKANONYMIZE_CLEARING_PHASE_FAILED_TEXT
-                else:
-                    c.notification_text = \
-                                MARKANONYMIZE_INCOMPLETE_PHASE_FAILED_TEXT
-                c.url_ok = h.url_for(controller="/case_overview")
-                return render('/casemanagement/dialogs/failed_markanonymize_phase_incomplete_from_overview.mako')
-            if confirmed == 1:
-                state = case.getState().setState(4)
-                if state:
-                    _completeAnonymizedCase(case)
-                    c.success_for = MARKANONYMIZE_SUCCESS
-                    c.success_text = MARKANONYMIZE_SUCCESS_TEXT
-                    c.url_ok = h.url_for(controller="/case_overview")
-                    return render('/casemanagement/dialogs/success_markanonymize.mako')
-            else:
-                c.confirm_for = ANONYMIZE_CONFIRM
-                c.question = MARKANONYMIZE_CONFIRM_TEXT % \
-                      PHASE_DESCRIPTIONS[_determineAnonymizedCaseEndPhase(case)]
-                c.url_yes = "/case/markForAnonymize/%s/1" % id
-                c.url_no = h.url_for(controller="/case_overview")
-                return render('/casemanagement/dialogs/confirm_markanonymizeFromOverview.mako')
-        except:
-            return render('/tests/trace.mako')
-
-# vi#m:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list