source: WAeUP_SRP/trunk/__init__.py @ 1754

Last change on this file since 1754 was 1737, checked in by Henrik Bettermann, 18 years ago

merging with CPSSkinsless branch

In ZMI:

  • delete all portlets in .cps_portlets
  • delete all portlets in portal_cpsportlets
  • import Portlet Tool, Skins Tool and Themes Tool
  • optionally: - delete all themes in portal_themes and delete all method themes in portal_themes
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1#-*- mode: python; mode: fold -*-
2# $Id: __init__.py 1737 2007-05-04 19:38:23Z henrik $
3from Products.CMFCore.utils import ContentInit, ToolInit
4from Products.CMFCore.DirectoryView import registerDirectory
5from Products.CMFCore import utils as cmfutils
6from Products.CMFCore.permissions import AddPortalContent
7
8from Products.GenericSetup import profile_registry
9from Products.GenericSetup import EXTENSION
10
11from Products.CPSCore.interfaces import ICPSSite
12
13import PatchCPSWorkflowWorkflowDefinition
14import PatchCatalogToolXMLAdapter
15import PatchCPSSchemasAttributeStorageAdapter
16import PatchCPSSchemasDataModel
17import PatchCPSSchemasVocabulariesTool
18import PatchCPSMembershipTool
19import PatchCPSUserFolderUserFolder
20import PatchCPSStackingDirectoryStorageAdapter
21import PatchBasicWidgetsCPSStringWidget
22import PatchBasicWidgetsUnprepare
23# Only for CPS 3.4.1. In 3.4.2 and later this should be fixed.
24import PatchCPSDefaultImportExport
25import PatchRenderActionIcon
26import Products.WAeUP_SRP.WAeUPPermissions
27import WAeUPTool
28
29import Widgets
30tools = (WAeUPTool.WAeUPTool,)
31
32waeup_types = (
33    ("University",('University',)),
34    ("Academics",
35       ("AcademicsFolder",
36        "Certificate",
37        "CertificateCourse",
38        "Faculty",
39        "Department",
40        "Course",
41        "CertificateCourse",
42        "StudyLevel",
43        )
44     ),
45     ("Accommodation",
46        ("AccoFolder",
47         "AccoHall",
48         )
49     ),
50     ("Payment",
51        ("PaymentsFolder",
52         "Payment",
53         )
54     ),
55     ("Students",
56        ("StudentsFolder",
57         "Student",
58         "StudentAccommodation",
59         "StudentStudyCourse",
60         "StudentCourseResult",
61         "StudentApplication",
62         "StudentPume",
63         "StudentClearance",
64         "StudentPersonal",
65         "StudentStudyLevel",
66         #"Semester",
67         "StudentCourseResult",
68         # move to Academics later
69         #"Semester",
70         )
71      ),
72     ("ScratchCards",
73         ("ScratchCardBatch",
74         "ScratchCardBatchesFolder",
75         ),
76     )
77    )
78
79contentClasses = []
80cc = []
81for modu,names in waeup_types:
82    mod = __import__('Products.WAeUP_SRP.%(modu)s' % vars(),
83                globals(),
84                locals(),
85                ['*',]
86                )
87    for name in names:
88        #print name
89        contentClasses.append(getattr(mod,name))
90        cc.append(getattr(mod,"add%(name)s" % vars()))
91contentConstructors = tuple(cc)
92
93fti = [{} for t in range(len(contentConstructors))]
94
95registerDirectory('skins', globals())
96
97def initialize(registrar):
98    ToolInit('WAeUP Tool',
99              tools=tools,
100              icon='tool.gif',
101              ).initialize(registrar)
102    ContentInit('WAeUP Types',
103                content_types = contentClasses,
104                permission = AddPortalContent,
105                extra_constructors = contentConstructors,
106                fti = fti,
107                ).initialize(registrar)
108
109    # Extension profile registration
110    profile_registry.registerProfile(
111        'default',
112        'WAeUP_SRP',
113        "The WestAfrican e-University Project",
114        'profiles/default',
115        'WAeUP_SRP',
116        EXTENSION,
117        for_=ICPSSite)
118
Note: See TracBrowser for help on using the repository browser.