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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 25 16:52:44 CET 2010


Author: torsten
Date: 2010-02-25 16:52:43 +0100 (Thu, 25 Feb 2010)
New Revision: 1807

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


Modified: wasko/branches/2.0/jmdweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/jmdweb/controllers/case.py	2010-02-25 15:49:46 UTC (rev 1806)
+++ wasko/branches/2.0/jmdweb/controllers/case.py	2010-02-25 15:52:43 UTC (rev 1807)
@@ -98,11 +98,6 @@
 wird der Administration zur Anonymisierung vorgelegt.</p>
 <p><b>Die Fallakte wird in der Phase </b>'%s'<b> anonymisiert!</b>"""
 
-ANONYMIZE_SUCCESS = u"""Fallakte anonymisiert!"""
-ANONYMIZE_SUCCESS_TEXT = u"""\
-Die personenbezogenen Daten der Fallakte wurden gelöscht und die
-Fallakte aus der Übersicht entfernt. Bitte klicken Sie auf "OK",
-um zur Fallaktenübersicht fortzufahren."""
 MARKANONYMIZE_SUCCESS = u"""Fallakte wurde zur Anonymisierung freigegeben!"""
 MARKANONYMIZE_SUCCESS_TEXT = u"""\
 Die Fallakten wurde zur Anonymisierung freigeben und liegt der
@@ -399,41 +394,4 @@
         except:
             return render('/tests/trace.mako')
 
-    @checkRole('admin_ka')
-    def anonymize(self, id, confirmed):
-        id = self._checkInt(id)
-        confirmed = self._checkBool(confirmed)
-        # Check if the case is in a consistent state (all required fields
-        # are filled also check if the phase is finished.)
-        case = self._loadCase(id)
-        if ((not case.getState().phasesAreConsistent()
-             or not case.getState().phasesAreCompleted()
-             or not case.getState().getPhase() in (CM_ENDE, NB_ENDE))
-            and case.isYoungerThan(INCONSISTENCY_CHECK_AFTER)):
-            c.failed_for = MARKANONYMIZE_INCOMPLETE_PHASE_FAILED
-            if case.getState().getPhase() in (CLEAR_START, CLEAR_ENDE):
-                c.failed_text = \
-                            MARKANONYMIZE_CLEARING_PHASE_FAILED_TEXT
-            else:
-                c.failed_text = \
-                            MARKANONYMIZE_INCOMPLETE_PHASE_FAILED_TEXT
-            c.url_ok = "/case/digest/%s" % id
-            return render('/casemanagement/dialogs/failed_anonymize.mako')
-
-        if confirmed == 1:
-            if case.anonymize():
-                c.success_for = ANONYMIZE_SUCCESS
-                c.success_text = ANONYMIZE_SUCCESS_TEXT
-                c.url_ok = h.url_for(controller="/case_overview")
-                return render('/casemanagement/dialogs/success_anonymize.mako')
-            # TODO: Create Errorpage
-            return "Error! Could not anonymize ds."
-        else:
-            c.context = "../main.mako"
-            c.confirm_for = ANONYMIZE_CONFIRM
-            c.question = ANONYMIZE_CONFIRM_TEXT
-            c.url_yes = "/case/anonymize/%s/1" % id
-            c.url_no = "/case/digest/%s" % id
-            return render('/casemanagement/dialogs/confirm_anonymize.mako')
-
-# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
+# vi#m:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list