1 | from Products.CMFCore.DirectoryView import registerDirectory |
---|
2 | from Products.CMFCore import utils as cmfutils |
---|
3 | from Products.CMFCore.CMFCorePermissions import AddPortalContent |
---|
4 | |
---|
5 | registerDirectory('skins', globals()) |
---|
6 | |
---|
7 | import University |
---|
8 | import Students |
---|
9 | import Accommodation |
---|
10 | import Faculty |
---|
11 | import Widgets |
---|
12 | import WAeUPPermissions |
---|
13 | |
---|
14 | fti = (Students.student_fti, |
---|
15 | Students.studentpersonal_fti, |
---|
16 | Students.jamb_fti, |
---|
17 | Students.study_level_fti, |
---|
18 | Students.semester_fti, |
---|
19 | Accommodation.accofolder_fti, |
---|
20 | Accommodation.accommodation_fti, |
---|
21 | Faculty.faculty_fti, |
---|
22 | Faculty.department_fti, |
---|
23 | Faculty.course_fti, |
---|
24 | Faculty.course_ticket_fti, |
---|
25 | ) |
---|
26 | |
---|
27 | contentClasses = (University.University, |
---|
28 | Students.StudentsFolder, |
---|
29 | Students.Student, |
---|
30 | Students.StudentPersonal, |
---|
31 | Students.Jamb, |
---|
32 | Students.StudyLevel, |
---|
33 | Students.Semester, |
---|
34 | Accommodation.AccoFolder, |
---|
35 | Accommodation.Accommodation, |
---|
36 | Faculty.Faculty, |
---|
37 | Faculty.Department, |
---|
38 | Faculty.Course, |
---|
39 | Faculty.CourseTicket, |
---|
40 | ) |
---|
41 | |
---|
42 | contentConstructors = (University.addUniversity, |
---|
43 | Students.addStudentsFolder, |
---|
44 | Students.addStudent, |
---|
45 | Students.addStudentPersonal, |
---|
46 | Students.addJamb, |
---|
47 | Students.addStudyLevel, |
---|
48 | Students.addSemester, |
---|
49 | Accommodation.addAccommodation, |
---|
50 | Accommodation.addAccoFolder, |
---|
51 | Faculty.addFaculty, |
---|
52 | Faculty.addDepartment, |
---|
53 | Faculty.addCourse, |
---|
54 | Faculty.addCourseTicket, |
---|
55 | ) |
---|
56 | |
---|
57 | def initialize(registrar): |
---|
58 | cmfutils.ContentInit( |
---|
59 | 'WAeUP', |
---|
60 | content_types=contentClasses, |
---|
61 | permission=AddPortalContent, |
---|
62 | extra_constructors=contentConstructors, |
---|
63 | fti=fti, |
---|
64 | |
---|
65 | ).initialize(registrar) |
---|