Changeset 199 for waeup_product


Ignore:
Timestamp:
4 Apr 2006, 13:26:08 (19 years ago)
Author:
joachim
Message:

=profiles created upgrade to CPS3.4

Location:
waeup_product/trunk
Files:
243 added
3 edited

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/Widgets.py

    r58 r199  
    11#-*- mode: python; mode: fold -*-
    22from Globals import InitializeClass
    3 from Products.CPSSchemas.Widget import CPSWidgetType
     3##from Products.CPSSchemas.Widget import CPSWidgetType
    44from Products.CPSSchemas.BasicWidgets import CPSStringWidget, CPSEmailWidget
    55from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget
    6 from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry
     6from Products.CPSSchemas.Widget import widgetRegistry
     7##from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry
    78from DateTime.DateTime import DateTime
    89from AccessControl import getSecurityManager
     
    4243InitializeClass(StudentIdWidget)
    4344
    44 class StudentIdWidgetType(CPSWidgetType):
    45     """Student Id String widget type."""
    46     meta_type = "StudentId  Widget Type"
    47     cls = StudentIdWidget
     45widgetRegistry.register(StudentIdWidget)
     46
     47##Class StudentIdWidgetType(CPSWidgetType):
     48##    """Student Id String widget type."""
     49##    meta_type = "StudentId  Widget Type"
     50##    cls = StudentIdWidget
    4851
    4952###)
     
    5154class ScratchcardPinWidget(CPSStringWidget): ###(
    5255    """ ScratchcardPin Widget"""
    53     meta_type = "ScratchcardPin Widget"
     56    meta_type = "Scratchcard Pin Widget"
    5457    valid_pins = ['123456',
    5558                  '234567',
     
    7881
    7982InitializeClass(ScratchcardPinWidget)
    80 
    81 class ScratchcardPinWidgetType(CPSWidgetType):
    82     """Scratchcard Pin widget type."""
    83     meta_type = "Scratchcard Pin Widget Type"
    84     cls = ScratchcardPinWidget
     83widgetRegistry.register(ScratchcardPinWidget)
     84
     85##class ScratchcardPinWidgetType(CPSWidgetType):
     86##    """Scratchcard Pin widget type."""
     87##    meta_type = "Scratchcard Pin Widget Type"
     88##    cls = ScratchcardPinWidget
    8589
    8690###)
     
    8892###########
    8993
    90 WidgetTypeRegistry.register(StudentIdWidgetType)
    91 WidgetTypeRegistry.register(ScratchcardPinWidgetType)
     94##WidgetTypeRegistry.register(StudentIdWidgetType)
     95##WidgetTypeRegistry.register(ScratchcardPinWidgetType)
    9296
    9397##class MyProjectWeekDateTimeWidget(CPSDateTimeWidget): ###(
  • waeup_product/trunk/__init__.py

    r197 r199  
     1#-*- mode: python; mode: fold -*-
    12from Products.CMFCore.utils import ContentInit, ToolInit
    23from Products.CMFCore.DirectoryView import registerDirectory
     
    45from Products.CMFCore.CMFCorePermissions import AddPortalContent
    56
     7from Products.GenericSetup import profile_registry
     8from Products.GenericSetup import EXTENSION
     9
     10from Products.CPSCore.interfaces import ICPSSite
     11
     12import Widgets
     13
    614registerDirectory('skins', globals())
    715
    8 import University
    9 import Students
    10 import Accommodation
    11 import Faculty
    12 import Widgets
    13 import WAeUPPermissions
    14 import WAeUPTool
     16def initialize(registrar):
     17    # Extension profile registration
     18    profile_registry.registerProfile(
     19        'default',
     20        'WAeUP',
     21        "The WestAfrican e-University Project",
     22        'profiles/default',
     23        'WAeUP',
     24        EXTENSION,
     25        for_=ICPSSite)
    1526
    16 tools = (
    17     WAeUPTool.WAeUPTool,
    18 )
    1927
    20 fti = (Students.student_fti,
    21        Students.studentdocuments_fti,
    22        Students.studentpersonal_fti,
    23        Students.studenteligibility_fti,
    24        Students.jamb_fti,
    25        Students.study_level_fti,
    26        Students.semester_fti,
    27        Accommodation.accofolder_fti,
    28        Accommodation.accommodation_fti,
    29        Faculty.faculty_fti,
    30        Faculty.department_fti,
    31        Faculty.course_fti,
    32        Faculty.course_ticket_fti,
    33       )
     28##import University ###(
     29##import Students
     30##import Accommodation
     31##import Faculty
     32##import Widgets
     33##import WAeUPPermissions
     34##import WAeUPTool
     35##
     36##tools = (
     37##    WAeUPTool.WAeUPTool,
     38##)
     39##
     40##fti = (Students.student_fti,
     41##       Students.studentdocuments_fti,
     42##       Students.studentpersonal_fti,
     43##       Students.studenteligibility_fti,
     44##       Students.jamb_fti,
     45##       Students.study_level_fti,
     46##       Students.semester_fti,
     47##       Accommodation.accofolder_fti,
     48##       Accommodation.accommodation_fti,
     49##       Faculty.faculty_fti,
     50##       Faculty.department_fti,
     51##       Faculty.course_fti,
     52##       Faculty.course_ticket_fti,
     53##      )
     54##
     55##contentClasses = (University.University,
     56##                  Students.StudentsFolder,
     57##                  Students.Student,
     58##                  Students.StudentDocuments,
     59##                  Students.StudentPersonal,
     60##                  Students.StudentEligibility,
     61##                  Students.Jamb,
     62##                  Students.StudyLevel,
     63##                  Students.Semester,
     64##                  Accommodation.AccoFolder,
     65##                  Accommodation.Accommodation,
     66##                  Faculty.Faculty,
     67##                  Faculty.Department,
     68##                  Faculty.Course,
     69##                  Faculty.CourseTicket,
     70##                 )
     71##
     72##contentConstructors = (University.addUniversity,
     73##                       Students.addStudentsFolder,
     74##                       Students.addStudent,
     75##                       Students.addStudentDocuments,
     76##                       Students.addStudentPersonal,
     77##                       Students.addStudentEligibility,
     78##                       Students.addJamb,
     79##                       Students.addStudyLevel,
     80##                       Students.addSemester,
     81##                       Accommodation.addAccommodation,
     82##                       Accommodation.addAccoFolder,
     83##                       Faculty.addFaculty,
     84##                       Faculty.addDepartment,
     85##                       Faculty.addCourse,
     86##                       Faculty.addCourseTicket,
     87##                       )
     88##
     89##def initialize(context):
     90##    ToolInit(
     91##        'WAeUP Tool',
     92##        tools = tools,
     93##        icon = 'tool.png',
     94##    ).initialize(context)
     95##
     96##    ContentInit(
     97##        'WAeUP Contenttypes',
     98##        content_types=contentClasses,
     99##        permission=AddPortalContent,
     100##        extra_constructors=contentConstructors,
     101##        fti=fti,
     102##       
     103##    ).initialize(context)
     104##       
     105##    context.registerClass(WAeUPTool.WAeUPTool,
     106##                          constructors=(WAeUPTool.addWAeUPToolForm,
     107##                          WAeUPTool.addWAeUPTool,))
    34108
    35 contentClasses = (University.University,
    36                   Students.StudentsFolder,
    37                   Students.Student,
    38                   Students.StudentDocuments,
    39                   Students.StudentPersonal,
    40                   Students.StudentEligibility,
    41                   Students.Jamb,
    42                   Students.StudyLevel,
    43                   Students.Semester,
    44                   Accommodation.AccoFolder,
    45                   Accommodation.Accommodation,
    46                   Faculty.Faculty,
    47                   Faculty.Department,
    48                   Faculty.Course,
    49                   Faculty.CourseTicket,
    50                  )
     109###)
    51110
    52 contentConstructors = (University.addUniversity,
    53                        Students.addStudentsFolder,
    54                        Students.addStudent,
    55                        Students.addStudentDocuments,
    56                        Students.addStudentPersonal,
    57                        Students.addStudentEligibility,
    58                        Students.addJamb,
    59                        Students.addStudyLevel,
    60                        Students.addSemester,
    61                        Accommodation.addAccommodation,
    62                        Accommodation.addAccoFolder,
    63                        Faculty.addFaculty,
    64                        Faculty.addDepartment,
    65                        Faculty.addCourse,
    66                        Faculty.addCourseTicket,
    67                        )
    68 
    69 def initialize(context):
    70     ToolInit(
    71         'WAeUP Tool',
    72         tools = tools,
    73         icon = 'tool.png',
    74     ).initialize(context)
    75 
    76     ContentInit(
    77         'WAeUP Contenttypes',
    78         content_types=contentClasses,
    79         permission=AddPortalContent,
    80         extra_constructors=contentConstructors,
    81         fti=fti,
    82        
    83     ).initialize(context)
    84        
    85     context.registerClass(WAeUPTool.WAeUPTool,
    86                           constructors=(WAeUPTool.addWAeUPToolForm,
    87                           WAeUPTool.addWAeUPTool,))
    88 
  • waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py

    r190 r199  
    527527    },
    528528    'schoolresults': { ###(
    529         'type': 'CPS List List Field',
     529        #'type': 'CPS List List Field',
     530        'type': 'CPS String List Field',
    530531        'data': {
    531532            'is_searchabletext': False,
Note: See TracChangeset for help on using the changeset viewer.