Ignore:
Timestamp:
1 Oct 2006, 10:21:09 (18 years ago)
Author:
Henrik Bettermann
Message:

batch of fixes to open the frontend for the first time

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  
    1313"""
    1414
    15 
    1615request = context.REQUEST
    1716redirect = request.RESPONSE.redirect
     
    2221
    2322campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    24 member = pm.getAuthenticatedMember()
    25 roles = member.getRoles()
    26 isManager = "Manager" in roles or "SectionManager" in roles
    27 isStudent = "Student" in roles
    2823
    29 if isManager:
     24if context.isManager():
    3025    return redirect("%s/campus_manager_view" % campus.absolute_url())
    3126
    32 if isStudent:
     27if context.isStudent():
    3328    return redirect("%s/students_index" % campus.students.absolute_url())
    3429
  • WAeUP_SRP/trunk/skins/waeup_default/index_html.py

    r543 r603  
    1313"""
    1414
    15 
    1615request = context.REQUEST
    1716redirect = request.RESPONSE.redirect
     
    2120    return redirect("%s/srp_anonymous_view" % request.get('URL1'))
    2221
    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:
     22if context.isManager():
    2923    return redirect("%s/srp_manager_view" % context.absolute_url())
    3024
    31 if isStudent:
     25if context.isStudent():
    3226    return redirect("%s/srp_anonymous_view" % context.absolute_url())
    3327
  • WAeUP_SRP/trunk/skins/waeup_default/isManager.py

    r600 r603  
    1010# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
    1111"""
    12 return True if the member is considered a Manager in this context
     12return True if the member is considered a Manager,
     13consider all non-Student members to be Managers
     14
    1315"""
    1416request = context.REQUEST
     
    1820member = mtool.getAuthenticatedMember()
    1921path_info = request.get('PATH_INFO').split('/')
    20 roles = member.getRolesInContext(context)
     22#roles = member.getRolesInContext(context)
     23roles = member.getRoles()
    2124isStudent = "Student" in roles
    2225isStaff = not isStudent
    23 isManager = "Manager" in roles or "SectionManager" in roles or isStaff
     26#isManager = "Manager" in roles or "SectionManager" in roles or isStaff
     27isManager = isStaff
    2428return isManager
  • WAeUP_SRP/trunk/skins/waeup_default/isStudent.py

    r600 r603  
    1010# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
    1111"""
    12 return True if the member is considered a Student in this context
     12return True if the member is considered a Student
    1313"""
    1414request = context.REQUEST
     
    1818member = mtool.getAuthenticatedMember()
    1919path_info = request.get('PATH_INFO').split('/')
    20 roles = member.getRolesInContext(context)
     20#roles = member.getRolesInContext(context)
     21roles = member.getRoles()  # Student role is global
    2122isStudent = "Student" in roles
    22 isStaff = not isStudent
    23 isManager = "Manager" in roles or "SectionManager" in roles or isStaff
    2423return isStudent
  • WAeUP_SRP/trunk/skins/waeup_default/layout_search_edit.pt

    r584 r603  
    2222    <div class=''>
    2323      <div class='documentFields'>
    24         <table width="80%" cellpadding="2" cellspacing="2" summary="Form layout">
     24        <table width="" cellpadding="2" cellspacing="2" summary="Form layout">
    2525          <tr tal:repeat="row layout/rows" valign="top">
    2626            <td tal:repeat="cell row"
Note: See TracChangeset for help on using the changeset viewer.