[197] | 1 | from Products.CMFCore.utils import ContentInit, ToolInit |
---|
[19] | 2 | from Products.CMFCore.DirectoryView import registerDirectory |
---|
| 3 | from Products.CMFCore import utils as cmfutils |
---|
| 4 | from Products.CMFCore.CMFCorePermissions import AddPortalContent |
---|
| 5 | |
---|
| 6 | registerDirectory('skins', globals()) |
---|
| 7 | |
---|
[45] | 8 | import University |
---|
| 9 | import Students |
---|
[103] | 10 | import Accommodation |
---|
[68] | 11 | import Faculty |
---|
[59] | 12 | import Widgets |
---|
[84] | 13 | import WAeUPPermissions |
---|
[197] | 14 | import WAeUPTool |
---|
[19] | 15 | |
---|
[197] | 16 | tools = ( |
---|
| 17 | WAeUPTool.WAeUPTool, |
---|
| 18 | ) |
---|
| 19 | |
---|
[57] | 20 | fti = (Students.student_fti, |
---|
[166] | 21 | Students.studentdocuments_fti, |
---|
[89] | 22 | Students.studentpersonal_fti, |
---|
[179] | 23 | Students.studenteligibility_fti, |
---|
[89] | 24 | Students.jamb_fti, |
---|
[139] | 25 | Students.study_level_fti, |
---|
| 26 | Students.semester_fti, |
---|
[103] | 27 | Accommodation.accofolder_fti, |
---|
| 28 | Accommodation.accommodation_fti, |
---|
[68] | 29 | Faculty.faculty_fti, |
---|
| 30 | Faculty.department_fti, |
---|
| 31 | Faculty.course_fti, |
---|
[139] | 32 | Faculty.course_ticket_fti, |
---|
[68] | 33 | ) |
---|
[84] | 34 | |
---|
[45] | 35 | contentClasses = (University.University, |
---|
| 36 | Students.StudentsFolder, |
---|
[57] | 37 | Students.Student, |
---|
[166] | 38 | Students.StudentDocuments, |
---|
[89] | 39 | Students.StudentPersonal, |
---|
[179] | 40 | Students.StudentEligibility, |
---|
[89] | 41 | Students.Jamb, |
---|
[139] | 42 | Students.StudyLevel, |
---|
| 43 | Students.Semester, |
---|
[103] | 44 | Accommodation.AccoFolder, |
---|
| 45 | Accommodation.Accommodation, |
---|
[68] | 46 | Faculty.Faculty, |
---|
| 47 | Faculty.Department, |
---|
| 48 | Faculty.Course, |
---|
[139] | 49 | Faculty.CourseTicket, |
---|
[45] | 50 | ) |
---|
[19] | 51 | |
---|
[45] | 52 | contentConstructors = (University.addUniversity, |
---|
| 53 | Students.addStudentsFolder, |
---|
[57] | 54 | Students.addStudent, |
---|
[166] | 55 | Students.addStudentDocuments, |
---|
[89] | 56 | Students.addStudentPersonal, |
---|
[179] | 57 | Students.addStudentEligibility, |
---|
[139] | 58 | Students.addJamb, |
---|
| 59 | Students.addStudyLevel, |
---|
| 60 | Students.addSemester, |
---|
[103] | 61 | Accommodation.addAccommodation, |
---|
| 62 | Accommodation.addAccoFolder, |
---|
[68] | 63 | Faculty.addFaculty, |
---|
| 64 | Faculty.addDepartment, |
---|
| 65 | Faculty.addCourse, |
---|
[139] | 66 | Faculty.addCourseTicket, |
---|
[45] | 67 | ) |
---|
[19] | 68 | |
---|
[197] | 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', |
---|
[19] | 78 | content_types=contentClasses, |
---|
| 79 | permission=AddPortalContent, |
---|
| 80 | extra_constructors=contentConstructors, |
---|
| 81 | fti=fti, |
---|
| 82 | |
---|
[197] | 83 | ).initialize(context) |
---|
| 84 | |
---|
| 85 | context.registerClass(WAeUPTool.WAeUPTool, |
---|
| 86 | constructors=(WAeUPTool.addWAeUPToolForm, |
---|
| 87 | WAeUPTool.addWAeUPTool,)) |
---|
| 88 | |
---|