Changeset 199 for waeup_product
- Timestamp:
- 4 Apr 2006, 13:26:08 (19 years ago)
- Location:
- waeup_product/trunk
- Files:
-
- 243 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Widgets.py
r58 r199 1 1 #-*- mode: python; mode: fold -*- 2 2 from Globals import InitializeClass 3 from Products.CPSSchemas.Widget import CPSWidgetType3 ##from Products.CPSSchemas.Widget import CPSWidgetType 4 4 from Products.CPSSchemas.BasicWidgets import CPSStringWidget, CPSEmailWidget 5 5 from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget 6 from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry 6 from Products.CPSSchemas.Widget import widgetRegistry 7 ##from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry 7 8 from DateTime.DateTime import DateTime 8 9 from AccessControl import getSecurityManager … … 42 43 InitializeClass(StudentIdWidget) 43 44 44 class StudentIdWidgetType(CPSWidgetType): 45 """Student Id String widget type.""" 46 meta_type = "StudentId Widget Type" 47 cls = StudentIdWidget 45 widgetRegistry.register(StudentIdWidget) 46 47 ##Class StudentIdWidgetType(CPSWidgetType): 48 ## """Student Id String widget type.""" 49 ## meta_type = "StudentId Widget Type" 50 ## cls = StudentIdWidget 48 51 49 52 ###) … … 51 54 class ScratchcardPinWidget(CPSStringWidget): ###( 52 55 """ ScratchcardPin Widget""" 53 meta_type = "Scratchcard Pin Widget"56 meta_type = "Scratchcard Pin Widget" 54 57 valid_pins = ['123456', 55 58 '234567', … … 78 81 79 82 InitializeClass(ScratchcardPinWidget) 80 81 class ScratchcardPinWidgetType(CPSWidgetType): 82 """Scratchcard Pin widget type.""" 83 meta_type = "Scratchcard Pin Widget Type" 84 cls = ScratchcardPinWidget 83 widgetRegistry.register(ScratchcardPinWidget) 84 85 ##class ScratchcardPinWidgetType(CPSWidgetType): 86 ## """Scratchcard Pin widget type.""" 87 ## meta_type = "Scratchcard Pin Widget Type" 88 ## cls = ScratchcardPinWidget 85 89 86 90 ###) … … 88 92 ########### 89 93 90 WidgetTypeRegistry.register(StudentIdWidgetType)91 WidgetTypeRegistry.register(ScratchcardPinWidgetType)94 ##WidgetTypeRegistry.register(StudentIdWidgetType) 95 ##WidgetTypeRegistry.register(ScratchcardPinWidgetType) 92 96 93 97 ##class MyProjectWeekDateTimeWidget(CPSDateTimeWidget): ###( -
waeup_product/trunk/__init__.py
r197 r199 1 #-*- mode: python; mode: fold -*- 1 2 from Products.CMFCore.utils import ContentInit, ToolInit 2 3 from Products.CMFCore.DirectoryView import registerDirectory … … 4 5 from Products.CMFCore.CMFCorePermissions import AddPortalContent 5 6 7 from Products.GenericSetup import profile_registry 8 from Products.GenericSetup import EXTENSION 9 10 from Products.CPSCore.interfaces import ICPSSite 11 12 import Widgets 13 6 14 registerDirectory('skins', globals()) 7 15 8 import University 9 import Students 10 import Accommodation 11 import Faculty 12 import Widgets 13 import WAeUPPermissions 14 import WAeUPTool 16 def 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) 15 26 16 tools = (17 WAeUPTool.WAeUPTool,18 )19 27 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,)) 34 108 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 ###) 51 110 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 527 527 }, 528 528 'schoolresults': { ###( 529 'type': 'CPS List List Field', 529 #'type': 'CPS List List Field', 530 'type': 'CPS String List Field', 530 531 'data': { 531 532 'is_searchabletext': False,
Note: See TracChangeset for help on using the changeset viewer.