source: WAeUP_SRP/trunk/__init__.py @ 1764

Last change on this file since 1764 was 1737, checked in by Henrik Bettermann, 17 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
RevLine 
[199]1#-*- mode: python; mode: fold -*-
[204]2# $Id: __init__.py 1737 2007-05-04 19:38:23Z henrik $
[206]3from Products.CMFCore.utils import ContentInit, ToolInit
[19]4from Products.CMFCore.DirectoryView import registerDirectory
5from Products.CMFCore import utils as cmfutils
[452]6from Products.CMFCore.permissions import AddPortalContent
[19]7
[199]8from Products.GenericSetup import profile_registry
9from Products.GenericSetup import EXTENSION
[19]10
[199]11from Products.CPSCore.interfaces import ICPSSite
12
[511]13import PatchCPSWorkflowWorkflowDefinition
14import PatchCatalogToolXMLAdapter
[537]15import PatchCPSSchemasAttributeStorageAdapter
[1080]16import PatchCPSSchemasDataModel
[1350]17import PatchCPSSchemasVocabulariesTool
[918]18import PatchCPSMembershipTool
[881]19import PatchCPSUserFolderUserFolder
[933]20import PatchCPSStackingDirectoryStorageAdapter
[867]21import PatchBasicWidgetsCPSStringWidget
[1065]22import PatchBasicWidgetsUnprepare
[265]23# Only for CPS 3.4.1. In 3.4.2 and later this should be fixed.
[263]24import PatchCPSDefaultImportExport
[1737]25import PatchRenderActionIcon
[274]26import Products.WAeUP_SRP.WAeUPPermissions
[828]27import WAeUPTool
[200]28
[59]29import Widgets
[828]30tools = (WAeUPTool.WAeUPTool,)
[19]31
[452]32waeup_types = (
[454]33    ("University",('University',)),
34    ("Academics",
35       ("AcademicsFolder",
36        "Certificate",
37        "CertificateCourse",
38        "Faculty",
39        "Department",
40        "Course",
41        "CertificateCourse",
[565]42        "StudyLevel",
[454]43        )
44     ),
45     ("Accommodation",
46        ("AccoFolder",
[622]47         "AccoHall",
[454]48         )
49     ),
[1226]50     ("Payment",
51        ("PaymentsFolder",
52         "Payment",
53         )
54     ),
[454]55     ("Students",
56        ("StudentsFolder",
57         "Student",
[639]58         "StudentAccommodation",
[454]59         "StudentStudyCourse",
[464]60         "StudentCourseResult",
[472]61         "StudentApplication",
[758]62         "StudentPume",
[454]63         "StudentClearance",
64         "StudentPersonal",
[464]65         "StudentStudyLevel",
[760]66         #"Semester",
[467]67         "StudentCourseResult",
[464]68         # move to Academics later
[565]69         #"Semester",
[454]70         )
71      ),
[488]72     ("ScratchCards",
73         ("ScratchCardBatch",
74         "ScratchCardBatchesFolder",
75         ),
76     )
[200]77    )
78
[452]79contentClasses = []
80cc = []
[454]81for modu,names in waeup_types:
82    mod = __import__('Products.WAeUP_SRP.%(modu)s' % vars(),
[452]83                globals(),
84                locals(),
[454]85                ['*',]
[452]86                )
[454]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)
[200]92
[440]93fti = [{} for t in range(len(contentConstructors))]
[200]94
[199]95registerDirectory('skins', globals())
[197]96
[199]97def initialize(registrar):
[828]98    ToolInit('WAeUP Tool',
99              tools=tools,
100              icon='tool.gif',
101              ).initialize(registrar)
[200]102    ContentInit('WAeUP Types',
103                content_types = contentClasses,
104                permission = AddPortalContent,
105                extra_constructors = contentConstructors,
106                fti = fti,
107                ).initialize(registrar)
108
[199]109    # Extension profile registration
110    profile_registry.registerProfile(
111        'default',
[274]112        'WAeUP_SRP',
[199]113        "The WestAfrican e-University Project",
114        'profiles/default',
[274]115        'WAeUP_SRP',
[199]116        EXTENSION,
117        for_=ICPSSite)
[84]118
Note: See TracBrowser for help on using the repository browser.