Changeset 603 for WAeUP_SRP/trunk/skins/waeup_default
- Timestamp:
- 1 Oct 2006, 10:21:09 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_default
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/campus_index.py
r543 r603 13 13 """ 14 14 15 16 15 request = context.REQUEST 17 16 redirect = request.RESPONSE.redirect … … 22 21 23 22 campus = context.portal_catalog(meta_type = "University")[-1].getObject() 24 member = pm.getAuthenticatedMember()25 roles = member.getRoles()26 isManager = "Manager" in roles or "SectionManager" in roles27 isStudent = "Student" in roles28 23 29 if isManager:24 if context.isManager(): 30 25 return redirect("%s/campus_manager_view" % campus.absolute_url()) 31 26 32 if isStudent:27 if context.isStudent(): 33 28 return redirect("%s/students_index" % campus.students.absolute_url()) 34 29 -
WAeUP_SRP/trunk/skins/waeup_default/index_html.py
r543 r603 13 13 """ 14 14 15 16 15 request = context.REQUEST 17 16 redirect = request.RESPONSE.redirect … … 21 20 return redirect("%s/srp_anonymous_view" % request.get('URL1')) 22 21 23 member = pm.getAuthenticatedMember() 24 roles = member.getRoles() 25 isManager = "Manager" in roles or "SectionManager" in roles 26 isStudent = "Student" in roles 27 28 if isManager: 22 if context.isManager(): 29 23 return redirect("%s/srp_manager_view" % context.absolute_url()) 30 24 31 if isStudent:25 if context.isStudent(): 32 26 return redirect("%s/srp_anonymous_view" % context.absolute_url()) 33 27 -
WAeUP_SRP/trunk/skins/waeup_default/isManager.py
r600 r603 10 10 # $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $ 11 11 """ 12 return True if the member is considered a Manager in this context 12 return True if the member is considered a Manager, 13 consider all non-Student members to be Managers 14 13 15 """ 14 16 request = context.REQUEST … … 18 20 member = mtool.getAuthenticatedMember() 19 21 path_info = request.get('PATH_INFO').split('/') 20 roles = member.getRolesInContext(context) 22 #roles = member.getRolesInContext(context) 23 roles = member.getRoles() 21 24 isStudent = "Student" in roles 22 25 isStaff = not isStudent 23 isManager = "Manager" in roles or "SectionManager" in roles or isStaff 26 #isManager = "Manager" in roles or "SectionManager" in roles or isStaff 27 isManager = isStaff 24 28 return isManager -
WAeUP_SRP/trunk/skins/waeup_default/isStudent.py
r600 r603 10 10 # $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $ 11 11 """ 12 return True if the member is considered a Student in this context12 return True if the member is considered a Student 13 13 """ 14 14 request = context.REQUEST … … 18 18 member = mtool.getAuthenticatedMember() 19 19 path_info = request.get('PATH_INFO').split('/') 20 roles = member.getRolesInContext(context) 20 #roles = member.getRolesInContext(context) 21 roles = member.getRoles() # Student role is global 21 22 isStudent = "Student" in roles 22 isStaff = not isStudent23 isManager = "Manager" in roles or "SectionManager" in roles or isStaff24 23 return isStudent -
WAeUP_SRP/trunk/skins/waeup_default/layout_search_edit.pt
r584 r603 22 22 <div class=''> 23 23 <div class='documentFields'> 24 <table width=" 80%" cellpadding="2" cellspacing="2" summary="Form layout">24 <table width="" cellpadding="2" cellspacing="2" summary="Form layout"> 25 25 <tr tal:repeat="row layout/rows" valign="top"> 26 26 <td tal:repeat="cell row"
Note: See TracChangeset for help on using the changeset viewer.