Changeset 119
- Timestamp:
- 28 Oct 2005, 19:44:25 (19 years ago)
- Location:
- waeup_product/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Extensions/install.py
r115 r119 29 29 product_name = self.product_name 30 30 self.log("Starting %(product_name)s install" % vars() ) 31 31 32 32 # Roles and Permissions ###( 33 33 # … … 48 48 waeup_perms = { 49 49 UniversityManage: 50 ('Manager', 'SectionManager','UniversityManager', 50 ('Manager', 'SectionManager','UniversityManager', 51 51 ), 52 52 StudentManage: 53 ('Manager', 'SectionManager','UniversityManager', 'StudentManager' 53 ('Manager', 'SectionManager','UniversityManager', 'StudentManager' 54 54 ), 55 55 FacultyManage: 56 ('Manager', 'SectionManager','UniversityManager', 'FacultyManager' 56 ('Manager', 'SectionManager','UniversityManager', 'FacultyManager' 57 57 ), 58 58 DepartmentManage: 59 ('Manager', 'SectionManager','UniversityManager', 'DepartmentManager' 59 ('Manager', 'SectionManager','UniversityManager', 'DepartmentManager' 60 60 ), 61 61 CourseManage: 62 ('Manager', 'SectionManager','UniversityManager', 'CourseManager' 62 ('Manager', 'SectionManager','UniversityManager', 'CourseManager' 63 63 ), 64 64 } … … 68 68 69 69 ########################################## 70 # Actions 70 # Actions 71 71 ########################################## 72 72 waeup_ptypes = "'University','StudentsFolder','Student','Jamb','Faculty','Department','Course'" 73 waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','Academics '"73 waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','AcademicsFolder'" 74 74 if CPSSubscriptions: ###( 75 75 76 76 ptypes = "('Portal', 'CPSMailAccess Message', 'CPSMailAccess Box', 'CPSMailAccess Folder',"\ 77 77 + waeup_ptypes + ")" 78 78 condition = "object.portal_type not in %s" % ptypes 79 79 80 80 action = {'id' : 'notify_content', 81 81 'name' : 'action_notify_content', … … 89 89 if CPSForum: 90 90 condition = "object.portal_type not in (%s)" % waeup_ptypes 91 91 92 92 action = {'id' : 'activate_comments', 93 93 'name': 'action_activate_comments', … … 136 136 } 137 137 self.verifyAction('portal_discussion', **action) 138 138 139 139 ###) 140 140 … … 144 144 actions = ( { 'tool' : 'portal_actions', 145 145 'id' : 'student_administration', 146 'name' : 'Student Administration',146 'name' : 'Students', 147 147 'action' : 'string:${portal_url}/sections/waeup/students', 148 148 'permission': (View, ), … … 161 161 'id' : 'accomodation', 162 162 'name' : 'Accommodation', 163 'action' : 'string:${portal_url}/sections/waeup/ Accommodation/accommodation_index_html',163 'action' : 'string:${portal_url}/sections/waeup/accommodation/accommodation_index_html', 164 164 'permissions': (View), 165 165 #'permissions': (ModifyPortalContent,UniversityManage,StudentManage), … … 226 226 ###) 227 227 228 # skins 228 # skins 229 229 ########################################## 230 230 self.log("Verifying %(product_name)s skinss" % vars()) … … 235 235 self.verifySkins(wskins) 236 236 self.resetSkinCache() 237 237 238 238 ########################################## 239 239 # portal types … … 265 265 # Groups 266 266 ########################################## 267 267 268 268 self.installCustomWorkflows() 269 269 self.verifyWorkflowAssociation() 270 270 271 271 self.log("End of specific %(product_name)s install" % vars()) 272 272 self.finalize() 273 273 274 274 275 275 def installCustomWorkflows(self): … … 285 285 """Verify workflow association 286 286 """ 287 ws_chains = { 287 ws_chains = { 288 288 'Student': 'waeup_workspace_wf', 289 289 'Jamb': 'waeup_workspace_wf', … … 319 319 for delEntry in ('StudentManager',): 320 320 if delEntry in groups.listEntryIds(): 321 groups.deleteEntry(delEntry) 321 groups.deleteEntry(delEntry) 322 322 for newEntry in ('Students',): 323 323 if newEntry not in groups.listEntryIds(): 324 groups.createEntry({'group': newEntry, 325 'members': []}) 324 groups.createEntry({'group': newEntry, 325 'members': []}) 326 326 #groups.manage_setLocalGroupRoles(groupid = 'StudentManager',roles=('Manager',)) 327 327 #groups.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',)) -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r113 r119 51 51 'action': 'folder_contents', 52 52 'condition': "python:member and 'Manager' in member.getRoles()", 53 'condition': "",54 53 'permissions': (ModifyPortalContent,)}, 55 54 {'id': 'edit', … … 106 105 { 107 106 'id' : 'add_jamb', 108 'name' : 'Add Student JAMB',107 'name' : 'Add JAMB Data', 109 108 'action' : 'string:${object/absolute_url}/create_jamb', 110 109 'permissions': (UniversityManage,StudentManage)}, 111 {'id': 'localroles', 112 'name': 'delegate', 113 'action': 'folder_localrole_form', 114 'permissions': (UniversityManage,) 115 }, 110 { 111 'id': 'localroles', 112 'name': 'delegate', 113 'action': 'folder_localrole_form', 114 'permissions': (ModifyPortalContent), 115 'visible' : 0, 116 }, 116 117 ## {'id': 'contents', 117 118 ## 'name': 'action_folder_contents', … … 159 160 'permissions': (View,)}, 160 161 {'id': 'add_faculty', 161 'name': 'Add aFaculty',162 'name': 'Add Faculty', 162 163 'condition': "python:member and 'UniversityManager'in member.getRoles()", 163 164 'action' : 'string:${object/absolute_url}/create_common?type_name=Faculty', … … 208 209 'condition': "python:member and 'Manager' in member.getRoles()", 209 210 'permissions': (UniversityManage,)}, 210 211 {'id': 'localroles', 211 212 'name': 'delegate', 212 213 'action': 'folder_localrole_form', 213 'permissions': (UniversityManage,) 214 'permissions': (ModifyPortalContent), 215 'visible' : 0, 214 216 }, 215 217 ) … … 306 308 'permission': (ModifyPortalContent,StudentManage), 307 309 }, 308 310 {'id': 'localroles', 309 311 'name': 'delegate', 310 312 'action': 'folder_localrole_form', 311 'permissions': (UniversityManage,) 313 'permissions': (ModifyPortalContent), 314 'visible' : 0, 312 315 }, 313 316 { … … 407 410 'visible': True,}, 408 411 {'id': 'add_department', 409 'name': 'Add aDepartment',412 'name': 'Add Department', 410 413 'action' : 'string:${object/absolute_url}/create_common?type_name=Department', 411 414 'permissions': (ModifyPortalContent,UniversityManage,)}, … … 428 431 'name': 'delegate', 429 432 'action': 'folder_localrole_form', 430 'permissions': (UniversityManage,) 433 'permissions': (ModifyPortalContent), 434 'visible' : 0, 431 435 }, 432 436 ) … … 469 473 'visible': True,}, 470 474 {'id': 'create_course', 471 'name': 'Add aCourse',475 'name': 'Add Course', 472 476 'action' : 'string:${object/absolute_url}/create_course', 473 477 'permissions': (ModifyPortalContent,UniversityManage,)}, … … 490 494 'name': 'delegate', 491 495 'action': 'folder_localrole_form', 492 'permissions': (UniversityManage,) 493 }, 494 ) 495 } 496 ###) 497 498 course_type = { ###( 496 'permissions': (ModifyPortalContent), 497 'visible' : 0, 498 }, 499 ) 500 } 501 ###) 502 503 course_type = { ###( 499 504 'title': 'WAeUP Course', 500 505 'description': '', … … 550 555 'name': 'delegate', 551 556 'action': 'folder_localrole_form', 552 'permissions': (UniversityManage,) 557 'permissions': (ModifyPortalContent), 558 'visible' : 0, 553 559 }, 554 560 ) … … 586 592 'visible': True,}, 587 593 {'id': 'add_accommodation', 588 'name': 'Add anAccommodation Hall',589 'condition': "python:member and not 'Student'in member.getRoles()",594 'name': 'Add Accommodation Hall', 595 'condition': "python:member and 'UniversityManager'in member.getRoles()", 590 596 'action' : 'add_accommodation', 591 597 #'action': 'folder_factories', … … 606 612 ###) 607 613 608 accommodation = { ###( 614 accommodation = { ###( 609 615 'title': 'WAeUP Accommodation', 610 616 'description': '', -
waeup_product/trunk/skins/waeup_faculty/academics_view_all.pt
r114 r119 15 15 <metal:block fill-slot="main" 16 16 tal:define="items here/contentValues"> 17 <h2> The Faculties</h2>17 <h2>Academics (Faculties)</h2> 18 18 <table cellspacing="0" cellpadding="0"> 19 19 <tal:block condition="python: len(items)"> -
waeup_product/trunk/skins/waeup_student/accommodation_index_html.py
r103 r119 3 3 # $Id$ 4 4 5 """Default view for the Accommodation. 5 """Default view for the Accommodation. 6 6 """ 7 7 … … 10 10 roles = member.getRoles() 11 11 if 'Manager' in roles: 12 return context. folder_view()12 return context.accommodation_view_manager(psm=psm) 13 13 elif 'StudentManager' in roles: 14 14 return context.accommodation_view_manager(psm=psm) -
waeup_product/trunk/skins/waeup_student/accommodation_view_all.pt
r103 r119 12 12 tal:define="items here/contentValues" 13 13 > 14 <h2> <span tal:content="context/id" /></h2>14 <h2>Accomodation</h2> 15 15 <table cellspacing="0" cellpadding="0"> 16 16 <tal:block condition="python: len(items)"> … … 19 19 <a href="jamb" 20 20 tal:attributes="href item/absolute_url" 21 tal:content="item/ title_or_id"></a>21 tal:content="item/heading"></a> 22 22 </td> 23 23 </tr> -
waeup_product/trunk/skins/waeup_student/accommodation_view_manager.pt
r103 r119 12 12 tal:define="items here/contentValues" 13 13 > 14 <h2> <span tal:content="context/id" /></h2>14 <h2>Accomodation</h2> 15 15 <table cellspacing="0" cellpadding="0"> 16 16 <tal:block condition="python: len(items)"> … … 19 19 <a href="jamb" 20 20 tal:attributes="href item/absolute_url" 21 tal:content="item/ title_or_id"></a>21 tal:content="item/heading"></a> 22 22 </td> 23 23 </tr> -
waeup_product/trunk/skins/waeup_student/accommodation_view_student.pt
r103 r119 12 12 tal:define="items here/contentValues" 13 13 > 14 <h2> <span tal:content="context/title_or_id" /></h2>14 <h2>Accomodation</h2> 15 15 <table cellspacing="0" cellpadding="0"> 16 16 <tal:block condition="python: len(items)"> … … 19 19 <a href="jamb" 20 20 tal:attributes="href item/absolute_url" 21 tal:content="item/ title_or_id"></a>21 tal:content="item/heading"></a> 22 22 </td> 23 23 </tr> -
waeup_product/trunk/skins/waeup_student/add_accommodation.py
r107 r119 16 16 lt = context.portal_layouts 17 17 18 accofolder = getattr(context,"Accommodation",None)19 if accofolder is None:20 context.invokeFactory('AccoFolder','Accommodation')21 accofolder = getattr(context,"Accommodation")22 context.notifyCPSDocumentCreation(ob=accofolder)23 24 25 18 res,psm,ds = lt.renderLayout(layout_id= 'accommodation', 26 19 schema_id = 'accommodation', … … 45 38 elif psm == 'valid': 46 39 oid = "%s" % ds.get('heading').replace(' ','') 47 accofolder.invokeFactory(type_name,oid)48 object = getattr( accofolder,oid)40 context.invokeFactory(type_name,oid) 41 object = getattr(context,oid) 49 42 object.getContent().edit(mapping=ds) 50 43 context.notifyCPSDocumentCreation(ob=object) 51 44 psm = 'new %s created' % oid 52 context_ti = context.portal_types[context.portal_type] 45 context_ti = context.portal_types[context.portal_type] 53 46 index = context_ti.getActionById('view','university_view') 54 47 return getattr(context,index)(psm=psm)
Note: See TracChangeset for help on using the changeset viewer.