[19] | 1 | from Products.CPSInstaller.CPSInstaller import CPSInstaller |
---|
| 2 | from Products.CMFCore.CMFCorePermissions import View |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | WAEUP_SKINS = { 'waeup_student' : 'Products/WAeUP/skins/waeup_student', |
---|
| 6 | } |
---|
| 7 | |
---|
| 8 | WAEUP_TYPES = { 'Student': |
---|
| 9 | { 'typeinfo_name': 'WAeUP: Student (Student)', |
---|
| 10 | 'add_meta_type': 'Factory-based Type Information', |
---|
| 11 | }, |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | WAEUP_ACTIONS = ( { 'tool' : 'portal_actions', |
---|
| 15 | 'id' : 'jambadmission', |
---|
| 16 | 'name' : 'action_jambadmission', |
---|
| 17 | 'action' : 'string:${portal_url}/jambadmission_input_form', |
---|
| 18 | 'permission': (View, ), |
---|
| 19 | 'condition' : '', |
---|
| 20 | 'category' : 'global', |
---|
| 21 | 'visible' : 1, |
---|
| 22 | }, |
---|
| 23 | ) |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | def install(self): |
---|
| 27 | product_name = "WAeUP" |
---|
| 28 | installer = CPSInstaller(self, product_name) |
---|
| 29 | installer.log("Starting %(product_name)s install" % vars() ) |
---|
| 30 | |
---|
| 31 | installer.log("Verifying %(product_name)s permissions" % vars()) |
---|
| 32 | installer.verifySkins(WAEUP_SKINS) |
---|
| 33 | installer.resetSkinCache() |
---|
| 34 | |
---|
| 35 | installer.log("Verifying %(product_name)s schemas" % vars()) |
---|
| 36 | installer.verifySchemas(self.WAeUPSchemas()) |
---|
| 37 | |
---|
| 38 | installer.log("Verifying %(product_name)s layouts" % vars()) |
---|
| 39 | installer.verifyLayouts(self.WAeUPLayouts()) |
---|
| 40 | installer.verifyPortalTypes(WAEUP_TYPES) |
---|
| 41 | |
---|
| 42 | ## installer.log("Verifying %(product_name)s types" % vars()) |
---|
| 43 | ## installer.verifyContentTypes(WAEUP_TYPES) |
---|
| 44 | |
---|
| 45 | installer.log("Verifying %(product_name)s actions" % vars()) |
---|
| 46 | installer.verifyActions(WAEUP_ACTIONS) |
---|
| 47 | |
---|
| 48 | # This installs the *.po files in the i18n directory of the WAeUPStudent |
---|
| 49 | # product. |
---|
| 50 | installer.log("Installing translations") |
---|
| 51 | |
---|
| 52 | installer.finalize() |
---|
| 53 | installer.log("End of specific %(product_name)s install" % vars()) |
---|
| 54 | return installer.logResult() |
---|