[Mpuls-commits] r842 - in wasko/branches/2.0: . waskaweb/config waskaweb/controllers waskaweb/tests/functional

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jan 25 18:03:25 CET 2010


Author: bh
Date: 2010-01-25 18:03:24 +0100 (Mon, 25 Jan 2010)
New Revision: 842

Removed:
   wasko/branches/2.0/waskaweb/controllers/rg_aid.py
   wasko/branches/2.0/waskaweb/tests/functional/test_rg_aid.py
Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/config/routing.py
Log:
* waskaweb/controllers/rg_aid.py,
waskaweb/tests/functional/test_rg_aid.py: Removed. Not used
anymore.

* waskaweb/config/routing.py (make_map): Remove references to rg_aid


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-01-25 16:58:05 UTC (rev 841)
+++ wasko/branches/2.0/ChangeLog	2010-01-25 17:03:24 UTC (rev 842)
@@ -1,5 +1,13 @@
 2010-01-25  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/controllers/rg_aid.py,
+	waskaweb/tests/functional/test_rg_aid.py: Removed. Not used
+	anymore.
+
+	* waskaweb/config/routing.py (make_map): Remove references to rg_aid
+
+2010-01-25  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/model/case.py (Case.getAppointments): Removed. Unused.
 
 2010-01-25  Bernhard Herzog  <bh at intevation.de>

Modified: wasko/branches/2.0/waskaweb/config/routing.py
===================================================================
--- wasko/branches/2.0/waskaweb/config/routing.py	2010-01-25 16:58:05 UTC (rev 841)
+++ wasko/branches/2.0/waskaweb/config/routing.py	2010-01-25 17:03:24 UTC (rev 842)
@@ -43,7 +43,6 @@
     # TAKE CARE OF ORDER HERE!!! FIRST RULE THAT MATCH WILL BE USED!
     map.connect('', controller='waska', action='index')
     map.connect('document/caseDelete/:id/:case/:confirmed', action="caseDelete", controller="document") 
-    map.connect('rg_aid/delete/:rg_id/:ds_type/:confirmed', action="delete", controller="rg_aid") 
     map.connect('case/markForDelete/:id/:confirmed', controller="case", action="markForDelete")
     map.connect('case/deleteAppointment/:id/:confirmed', controller="case", action="deleteAppointment")
     map.connect('case/deleteLogbookEntry/:id/:confirmed', controller="case", action="deleteLogbookEntry")
@@ -71,8 +70,6 @@
     map.connect('navigation/select_branch/:id', controller="navigation", action="select_branch")
 
 #    map.connect('navigation/:action/:ds_id/:page_id', controller="navigation")
-    map.connect('rg_aid/:action/:rg_id/:page_id/:form', controller="rg_aid") 
-    map.connect('rg_aid/:action/:rg_id/:page_id', controller="rg_aid")
     map.connect('formhelp', 'case/showhelp/:help_id', controller="case", action="showHelp")
     map.connect('required', 'case/required/:help_id', controller="case", action="showRequired")
     map.connect('showevalhelp', 'case/showHelpEvaluation/:help_id', controller="case", action="showHelpEvaluation")

Deleted: wasko/branches/2.0/waskaweb/controllers/rg_aid.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/rg_aid.py	2010-01-25 16:58:05 UTC (rev 841)
+++ wasko/branches/2.0/waskaweb/controllers/rg_aid.py	2010-01-25 17:03:24 UTC (rev 842)
@@ -1,142 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2007, 2008 Intevation GmbH, Germany, <info at intevation.de>
-# 
-# This file is part of mpuls WASKA (CoMPUter-based case fiLeS - 
-# Web-Anwendungs-Server fuer Kompetenzagenturen).
-# 
-# mpuls WASKA is free software: you can redistribute it and/or modify it under
-# the terms of the GNU Affero General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-# 
-# mpuls WASKA is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
-# License for more details.
-# 
-# You should have received a copy of the GNU Affero General Public
-# License along with mpuls WASKA. If not, see <http://www.gnu.org/licenses/>.
-# 
-# mpuls WASKA has been developed on behalf of the 
-# Projekttraeger im Deutschen Zentrum fuer Luft- und Raumfahrt e.V. (PT-DLR)
-# within the programme Kompetenzagenturen (Durchfuehrungsphase) funded by
-# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and 
-# European Social Fund resources.
-#
-# Authors:
-# Torsten Irländer <torsten.irlaender at intevation.de>
-# Sascha L. Teichmann <teichmann at intevation.de>
-#
-
-import paste
-import logging
-
-from paste.httpexceptions          import HTTPNotFound
-from waskaweb.lib.base             import *
-from waskaweb.controllers.CaseBase import CasebaseController
-from waskaweb.lib.security         import checkRole
-from waskaweb.model.repeatgroup    import AidObject, AidObjectFactory, AidList 
-
-log = logging.getLogger(__name__)
-
-DELETE_CONFIRM_HEADER = u'''Unterstützungsangebot löschen?'''
-DELETE_CONFIRM_EXPLAINATION = u'''Wollen Sie wirklich das Angebot löschen und die Daten unwiederbringlich verlieren?'''
-
-class RgAidController(CasebaseController):
-
-    def __before__(self):
-        CasebaseController.__before__(self)
-
-    def index(self):
-        raise HTTPNotFound()
-
-    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
-    def show(self, rg_id, page_id):
-        '''Returns the formular of an aid repeat group in show mode. The dataset is
-        identified by it id (rg_id) and its "type" (page_id)'''
-        rg_id     = self._checkInt(rg_id)
-        page_id   = self._checkInt(page_id)
-        ti        = self.getNavigation().getTreeItem(page_id)
-        c.ds_id   = rg_id
-        c.page_id = page_id
-
-        case_session = session.get('case')
-        case_session.setMode("show")
-        session.save()
-
-        c.print_form = "show" # Which page to open in popup on printing?           
-
-        content, navigation = self._getRenderdFormElements(ti, rg_id, page_id, ro_mode=True)
-        c.formular = content
-        c.form_navigation = navigation 
-        return render('/casemanagement/formular.mako')
-
-    @checkRole('cm_ka')
-    def edit(self, rg_id, page_id):
-        '''Returns the formular of an aid repeat group in edit mode. The dataset is
-        identified by it id (rg_id) and its "type" (page_id)'''
-        rg_id     = self._checkInt(rg_id)
-        page_id   = self._checkInt(page_id)
-        ti        = self.getNavigation().getTreeItem(page_id)
-        c.ds_id   = rg_id
-        c.page_id = page_id
-
-        case_session = session.get('case')
-        case_session.setMode("edit")
-        session.save()
-
-        c.print_form = "show" # Which page to open in popup on printing?           
-
-        content, navigation = self._getRenderdFormElements(ti, rg_id, page_id, ro_mode=False)
-        c.formular = content
-        c.form_navigation = navigation 
-        return render('/casemanagement/formular.mako')
-
-    @checkRole('cm_ka')
-    def newAction(self):
-        '''Creates a new aid repeat group. Returns the formular page of the new
-        RG in edit-mode'''
-        try:
-            case_id  = request.params.getone('case_id')
-            page_id  = request.params.getone('page_id')
-            aid_type = request.params.getone('aid_type')
-            factory  = AidObjectFactory()
-            aid      = factory.create(int(aid_type))
-            rg_id    = aid.create(int(case_id))
-            if rg_id and aid.page_id:
-                return self.edit(str(rg_id), aid.page_id)
-            else:
-                return "Error. Could not create new Aid"
-        except KeyError:
-            pass
-
-    @checkRole('cm_ka')
-    def delete(self, rg_id, ds_type, confirmed=False):
-        '''Deletes new aid repeat group. If confirmed is false the user will
-        get a confirmation dialog. This function return the overviewpage of the
-        repeatgroups''' 
-        rg_id     = self._checkInt(rg_id)
-        ds_type   = self._checkInt(ds_type)
-        confirmed = self._checkBool(confirmed)
-        if confirmed == 1:
-            factory  = AidObjectFactory()
-            aid      = factory.load(int(ds_type), int(rg_id))
-            if aid is None or aid.delete():
-                # Redirect to the overview page: 14 should be the correct page key 
-                c.success_for   = u'Angebot gelöscht!'
-                c.success_text  = u'Bitte klicken Sie auf "OK", um fortzufahren.'
-                c.url_ok        = "/case/edit/%s/14" % session.get('case').id
-                return render('/casemanagement/dialogs/success_delete_aid.mako')
-                #redirect_to('/case/edit/%s/14' % session.get('case').id) 
-            else:
-                return "Error! Could not delete ds."
-        else:
-            session_case  = session.get('case')
-            c.confirm_for = DELETE_CONFIRM_HEADER 
-            c.question    = DELETE_CONFIRM_EXPLAINATION 
-            c.url_yes     = "/rg_aid/delete/%s/%s/1" % (rg_id, ds_type) 
-            c.url_no      = "/case/edit/%s/14" % (session_case.id)
-            return render('/casemanagement/dialogs/confirm_delete_aid.mako')
-
-# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Deleted: wasko/branches/2.0/waskaweb/tests/functional/test_rg_aid.py
===================================================================
--- wasko/branches/2.0/waskaweb/tests/functional/test_rg_aid.py	2010-01-25 16:58:05 UTC (rev 841)
+++ wasko/branches/2.0/waskaweb/tests/functional/test_rg_aid.py	2010-01-25 17:03:24 UTC (rev 842)
@@ -1,30 +0,0 @@
-# Copyright 2007, 2008 Intevation GmbH, Germany, <info at intevation.de>
-# 
-# This file is part of mpuls WASKA (CoMPUter-based case fiLeS - 
-# Web-Anwendungs-Server fuer Kompetenzagenturen).
-# 
-# mpuls WASKA is free software: you can redistribute it and/or modify it under
-# the terms of the GNU Affero General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-# 
-# mpuls WASKA is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
-# License for more details.
-# 
-# You should have received a copy of the GNU Affero General Public
-# License along with mpuls WASKA. If not, see <http://www.gnu.org/licenses/>.
-# 
-# mpuls WASKA has been developed on behalf of the 
-# Projekttraeger im Deutschen Zentrum fuer Luft- und Raumfahrt e.V. (PT-DLR)
-# within the programme Kompetenzagenturen (Durchfuehrungsphase) funded by
-# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and 
-# European Social Fund resources.
-from waskaweb.tests import *
-
-class TestRgAidController(TestController):
-
-    def test_index(self):
-        response = self.app.get(url_for(controller='rg_aid'))
-        # Test response...



More information about the Mpuls-commits mailing list