Commit caaf835f authored by Jim Fulton's avatar Jim Fulton

Consolidated management functions related to tabs/views (from here to)

App.Management.Tabs.
parent a184cb88
...@@ -89,15 +89,15 @@ Aqueduct database adapters, etc. ...@@ -89,15 +89,15 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new This module can also be used as a simple template for implementing new
item types. item types.
$Id: SimpleItem.py,v 1.50 1999/05/07 19:54:38 klm Exp $''' $Id: SimpleItem.py,v 1.51 1999/05/10 16:32:04 jim Exp $'''
__version__='$Revision: 1.50 $'[11:-2] __version__='$Revision: 1.51 $'[11:-2]
import regex, sys, Globals, App.Management, Acquisition import regex, sys, Globals, App.Management, Acquisition
from webdav.Resource import Resource from webdav.Resource import Resource
from ExtensionClass import Base from ExtensionClass import Base
from DateTime import DateTime from DateTime import DateTime
from CopySupport import CopySource from CopySupport import CopySource
from string import join, lower, find from string import join, lower, find, split
from types import InstanceType, StringType from types import InstanceType, StringType
from ComputedAttribute import ComputedAttribute from ComputedAttribute import ComputedAttribute
...@@ -138,29 +138,9 @@ class Item(Base, Resource, CopySource, App.Management.Tabs): ...@@ -138,29 +138,9 @@ class Item(Base, Resource, CopySource, App.Management.Tabs):
# Default propertysheet info: # Default propertysheet info:
__propsets__=() __propsets__=()
__ac_permissions__=(
('View management screens', ('manage_workspace',)),
)
manage_info =Globals.HTMLFile('App/manage_info') manage_info =Globals.HTMLFile('App/manage_info')
manage_options=() manage_options=()
def manage_workspace(self, REQUEST):
"""Dispatch to first interface in manage_options
"""
try:
m=self.manage_options[0]['action']
if m=='manage_workspace': raise TypeError
except: return 'This object has no management interface'
if find(m,'/'):
raise 'Redirect', (
"%s/%s" % (REQUEST['URL1'], m))
return getattr(self, m)(self, REQUEST)
def title_or_id(self, st=type('')): def title_or_id(self, st=type('')):
""" """
Utility that returns the title if it is not blank and the id Utility that returns the title if it is not blank and the id
...@@ -339,7 +319,8 @@ class Item(Base, Resource, CopySource, App.Management.Tabs): ...@@ -339,7 +319,8 @@ class Item(Base, Resource, CopySource, App.Management.Tabs):
if not r != (not wannaBe): REQUEST.response.notFoundError() if not r != (not wannaBe): REQUEST.response.notFoundError()
return r return r
Globals.default__class_init__(Item) Globals.default__class_init__(Item)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment