1 | from Products.CMFCore.utils import ContentInit, ToolInit |
---|
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 | |
---|
8 | import University |
---|
9 | import Students |
---|
10 | import Accommodation |
---|
11 | import Faculty |
---|
12 | import Widgets |
---|
13 | import WAeUPPermissions |
---|
14 | import WAeUPTool |
---|
15 | |
---|
16 | tools = ( |
---|
17 | WAeUPTool.WAeUPTool, |
---|
18 | ) |
---|
19 | |
---|
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 | ) |
---|
34 | |
---|
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 | ) |
---|
51 | |
---|
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 | |
---|