[Mpuls-commits] r1513 - in wasko/branches/2.0: mpulsweb/controllers waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Feb 11 10:39:19 CET 2010
Author: torsten
Date: 2010-02-11 10:39:16 +0100 (Thu, 11 Feb 2010)
New Revision: 1513
Added:
wasko/branches/2.0/mpulsweb/controllers/navigation.py
Removed:
wasko/branches/2.0/waskaweb/controllers/navigation.py
Log:
Moved navigation controller to mpulsbase.
Copied: wasko/branches/2.0/mpulsweb/controllers/navigation.py (from rev 1512, wasko/branches/2.0/waskaweb/controllers/navigation.py)
Property changes on: wasko/branches/2.0/mpulsweb/controllers/navigation.py
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: wasko/branches/2.0/waskaweb/controllers/navigation.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/navigation.py 2010-02-11 09:36:39 UTC (rev 1512)
+++ wasko/branches/2.0/waskaweb/controllers/navigation.py 2010-02-11 09:39:16 UTC (rev 1513)
@@ -1,93 +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 logging
-
-from paste.httpexceptions import HTTPNotFound
-
-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
-
-log = logging.getLogger(__name__)
-
-class NavigationController(BaseController):
-
- @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
- def index(self):
- raise HTTPNotFound()
-
- def open_branch(self, id):
- self.navigation = session['navigation.tree']
- tree_item = self.navigation.getTreeItem(id)
- if not tree_item:
- raise HTTPNotFound()
- opened_folders = tree_item.unfold()
- for ti in opened_folders:
- mark_folderopen(ti)
- tree_item = tree_item.deepest_item()
- page_id = tree_item.key
- return FormularpageController().select(session.get('navigation'
- '.selectedpage',
- page_id))
-
- def close_branch(self, id):
- self.navigation = session['navigation.tree']
- tree_item = self.navigation.getTreeItem(id)
- if not tree_item:
- raise HTTPNotFound()
- tree_item.set_open(False)
- mark_folderclose(tree_item)
- page_id = tree_item.key
- return FormularpageController().select(session.get('navigation'
- '.selectedpage',
- page_id))
-
- def select_branch(self, id):
- self.navigation = session['navigation.tree']
- tree_item = self.navigation.getTreeItem(id)
- if not tree_item:
- raise HTTPNotFound()
- tree_item = tree_item.deepest_item()
- opened_folders = tree_item.unfold()
- for ti in opened_folders:
- mark_folderopen(ti)
- mark_folderopen(tree_item)
- page_id = tree_item.key
- session['navigation.selectedpage'] = page_id
- session.save()
- return FormularpageController().select(session.get('navigation'
- '.selectedpage',
- page_id))
-
-
-# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
More information about the Mpuls-commits
mailing list