[Mpuls-commits] r1717 - wasko/branches/2.0/jmdweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Feb 23 17:58:28 CET 2010
Author: torsten
Date: 2010-02-23 17:58:27 +0100 (Tue, 23 Feb 2010)
New Revision: 1717
Modified:
wasko/branches/2.0/jmdweb/controllers/case.py
Log:
* jmdweb/controllers/case.py: Deleted some functions which are now
defined in mpulsweb
Modified: wasko/branches/2.0/jmdweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/jmdweb/controllers/case.py 2010-02-23 16:57:14 UTC (rev 1716)
+++ wasko/branches/2.0/jmdweb/controllers/case.py 2010-02-23 16:58:27 UTC (rev 1717)
@@ -47,7 +47,7 @@
from mpulsweb.model.appointment import CaseAppointmentFactory
from mpulsweb.model.logbook import LogbookEntry
-from mpulsweb.controllers.formularpage import convert2dic, get_rendered_page
+from mpulsweb.controllers.formularpage import convert2dic
from mpulsweb.controllers.case import CaseController as MpulsCaseController
from jmdweb.lib.base import BaseController
@@ -228,70 +228,12 @@
class CaseController(MpulsCaseController):
- def init_case(self, id):
- '''Return a case object'''
- case = self._loadCase(id)
- # New session code
- session_case = case.getSessionCase()
- session['case'] = session_case
-
- open_folders = []
- navigation = get_navigation(id)
- session['render_mode'] = 'ro'
- session['navigation.tree'] = navigation
- session['navigation.openfolders'] = open_folders
- session.save()
- return case
-
@checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- def index(self):
- redirect_to(controller="/case_overview")
-
- @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
@checkPrivacyStatement()
def select(self, id, confirmed=0):
return self.digest(id)
- @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- def digest(self, id):
- log.debug('1')
- id = self._checkInt(id)
- case = self.init_case(id)
- log.debug('2')
- c.case = case
- c.last_access = case.getState().getAccessTime()
- c.daysToMaxSavetime = case.getState().daysToMaxSavetime()
- c.maxsavetime = case.getState().getMaxSavetime()
- c.finished = case.getState().isCmFinished()
- c.canceled = case.getState().isCmCanceled()
- log.debug('3')
- return render('/casemanagement/digest.mako')
- @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- def printdigest(self, id):
- c.print_version = 1
- return self.digest(id)
-
- @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- def printAll(self, id, empty='0'):
- c.print_version = 1
- out = []
- case = self._loadCase(id)
- c.case = case
- render_mode = session['render_mode']
- session['render_mode'] = 'ro'
- session.save()
- digest = render('/casemanagement/digest_body.mako')
- out.append(unicode(digest, 'utf-8'))
- navigation = session.get('navigation.tree')
- if navigation:
- for item in navigation.getAllItems():
- out.append(get_rendered_page(item.key))
- c.formular = "".join(out)
- session['render_mode'] = render_mode
- session.save()
- return render('/formularpage/formular.mako')
-
@checkRole('cm_ka')
def new(self):
session_case = SessionCase()
@@ -300,11 +242,6 @@
redirect_to('new2')
@checkRole('cm_ka')
- def new2(self):
- c.case = session.get('case')
- return render('/casemanagement/new.mako')
-
- @checkRole('cm_ka')
def newAction(self):
# TODO: Use htmlfill here!
session_case = SessionCase()
More information about the Mpuls-commits
mailing list