source: waeup_product/trunk/Accommodation.py @ 144

Last change on this file since 144 was 103, checked in by joachim, 19 years ago

=accommodationhall

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1#-*- mode: python; mode: fold -*-
2from Globals import InitializeClass
3from AccessControl import ClassSecurityInfo
4
5from Products.CMFCore.utils import UniqueObject, getToolByName
6from Products.CMFCore.permissions import View
7from Products.CMFCore.permissions import ModifyPortalContent
8from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
9#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
10from Products.CPSDocument.CPSDocument import CPSDocument
11from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
12
13accofolder_fti = { ###(
14    'title': 'WAeUP AccoFolder',
15    'description': '',
16    'content_icon': '',
17    'content_meta_type': 'AccoFolder',
18    'factory': 'addAccoFolder',
19    'immediate_view': 'cpsdocument_view',
20    'global_allow': True,
21    'filter_content_types': True,
22    'allowed_content_types': ('Accommodation',),
23    'allow_discussion': False,
24}
25###)
26
27class AccoFolder(CPSDocument): ###(
28    """
29    WAeUP AccoFolder containing Accommodation halls
30    """
31    meta_type = 'AccoFolder'
32    portal_type = meta_type
33    security = ClassSecurityInfo()
34   
35InitializeClass(AccoFolder)
36
37def addAccoFolder(container, id, REQUEST=None, **kw):
38    """Add a AccoFolder."""
39    ob = AccoFolder(id, **kw)
40    return CPSBase_adder(container, ob, REQUEST=REQUEST)
41###)
42
43accommodation_fti = { ###(
44    'title': 'WAeUP Accommodation',
45    'description': '',
46    'content_icon': '',
47    'content_meta_type': 'Accommodation',
48    'factory': 'addAccommodation',
49    'immediate_view': 'cpsdocument_view',
50    'global_allow': True,
51    'filter_content_types': True,
52    'allowed_content_types': (),
53    'allow_discussion': False,
54}
55###)
56
57class Accommodation(CPSDocument): ###(
58    """
59    WAeUP Accommodation containing Departments
60    """
61    meta_type = 'Accommodation'
62    portal_type = meta_type
63    security = ClassSecurityInfo()
64   
65InitializeClass(Accommodation)
66
67def addAccommodation(container, id, REQUEST=None, **kw):
68    """Add a Accommodation."""
69    ob = Accommodation(id, **kw)
70    return CPSBase_adder(container, ob, REQUEST=REQUEST)
71###)
Note: See TracBrowser for help on using the repository browser.