#-*- mode: python; mode: fold -*- from Globals import InitializeClass from AccessControl import ClassSecurityInfo from Products.CMFCore.utils import UniqueObject, getToolByName from Products.CMFCore.permissions import View from Products.CMFCore.permissions import ModifyPortalContent from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder #from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument from Products.CPSDocument.CPSDocument import CPSDocument from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder accofolder_fti = { ###( 'title': 'WAeUP AccoFolder', 'description': '', 'content_icon': '', 'content_meta_type': 'AccoFolder', 'factory': 'addAccoFolder', 'immediate_view': 'cpsdocument_view', 'global_allow': True, 'filter_content_types': True, 'allowed_content_types': ('Accommodation',), 'allow_discussion': False, } ###) class AccoFolder(CPSDocument): ###( """ WAeUP AccoFolder containing Accommodation halls """ meta_type = 'AccoFolder' portal_type = meta_type security = ClassSecurityInfo() InitializeClass(AccoFolder) def addAccoFolder(container, id, REQUEST=None, **kw): """Add a AccoFolder.""" ob = AccoFolder(id, **kw) return CPSBase_adder(container, ob, REQUEST=REQUEST) ###) accommodation_fti = { ###( 'title': 'WAeUP Accommodation', 'description': '', 'content_icon': '', 'content_meta_type': 'Accommodation', 'factory': 'addAccommodation', 'immediate_view': 'cpsdocument_view', 'global_allow': True, 'filter_content_types': True, 'allowed_content_types': (), 'allow_discussion': False, } ###) class Accommodation(CPSDocument): ###( """ WAeUP Accommodation containing Departments """ meta_type = 'Accommodation' portal_type = meta_type security = ClassSecurityInfo() InitializeClass(Accommodation) def addAccommodation(container, id, REQUEST=None, **kw): """Add a Accommodation.""" ob = Accommodation(id, **kw) return CPSBase_adder(container, ob, REQUEST=REQUEST) ###)