[Mpuls-commits] r1511 - wasko/branches/2.0/waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Feb 11 10:35:51 CET 2010
Author: torsten
Date: 2010-02-11 10:35:51 +0100 (Thu, 11 Feb 2010)
New Revision: 1511
Modified:
wasko/branches/2.0/waskaweb/controllers/navigation.py
Log:
* waskaweb/controllers/navigation.py (NavigationController):
Navigation Controller is not inherited from CasebaseController.
Inherit from BaseController. Deleted outcommented code.
Modified: wasko/branches/2.0/waskaweb/controllers/navigation.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/navigation.py 2010-02-11 09:29:26 UTC (rev 1510)
+++ wasko/branches/2.0/waskaweb/controllers/navigation.py 2010-02-11 09:35:51 UTC (rev 1511)
@@ -33,22 +33,15 @@
from paste.httpexceptions import HTTPNotFound
-from mpulsweb.lib.base import session
+from mpulsweb.lib.base import BaseController, session
from mpulsweb.lib.navigation import mark_folderopen, mark_folderclose
from mpulsweb.lib.security import checkRole
from mpulsweb.controllers.formularpage import FormularpageController
-from waskaweb.controllers.CaseBase import CasebaseController
-
-
log = logging.getLogger(__name__)
+class NavigationController(BaseController):
-class NavigationController(CasebaseController):
-
- def __before__(self):
- CasebaseController.__before__(self)
-
@checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
def index(self):
raise HTTPNotFound()
@@ -97,48 +90,5 @@
'.selectedpage',
page_id))
- #def __ensure_selected_page(self, case, tree_item):
- # page_id = case.page_id
- # if page_id is None:
- # page_id = tree_item.deepest_item().key
- # case.setPageId(page_id)
- # session.save()
- # return page_id
- #@checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- #def open_branch(self, tree_id):
- # case = session.get('case')
- # if not case: raise HTTPNotFound()
- # tree_id = self._checkInt(tree_id)
- # tree_item = self.navigation.getTreeItem(tree_id)
- # if not tree_item: raise HTTPNotFound()
- # tree_item.unfold()
- # page_id = self.__ensure_selected_page(case, tree_item)
- # return self.select_item(page_id)
-
- #@checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- #def close_branch(self, tree_id):
- # case = session.get('case')
- # if not case: raise HTTPNotFound()
- # tree_id = self._checkInt(tree_id)
- # tree_item = self.navigation.getTreeItem(tree_id)
- # if not tree_item: raise HTTPNotFound()
- # tree_item.set_open(False)
- # page_id = self.__ensure_selected_page(case, tree_item)
- # return self.select_item(page_id)
-
- #@checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- #def select_branch(self, tree_id):
- # case = session.get('case')
- # if not case: raise HTTPNotFound()
- # tree_id = self._checkInt(tree_id)
- # tree_item = self.navigation.getTreeItem(tree_id)
- # if not tree_item: raise HTTPNotFound()
- # tree_item = tree_item.deepest_item()
- # tree_item.unfold()
- # page_id = tree_item.key
- # case.setPageId(page_id)
- # session.save()
- # return self.select_item(page_id)
-
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
More information about the Mpuls-commits
mailing list