Changeset 600 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
29 Sep 2006, 19:07:33 (18 years ago)
Author:
joachim
Message:

added new methods isManager and isStudent, which are now used in all
getXXXInfo Scripts,
searchAcademics Form added - search not working yet.

Location:
WAeUP_SRP/trunk/skins
Files:
4 added
8 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_academics/academics_index.py

    r598 r600  
    2222campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    2323member = pm.getAuthenticatedMember()
    24 roles = member.getRolesInContext(context)
    25 isManager = "Manager" in roles or "SectionManager" in roles
    26 isStudent = "Student" in roles
    27 isStaff = "Staff" in roles
    2824
    29 if isStaff or isManager:
     25if context.isManager():
    3026    if context.portal_type == 'AcademicsFolder':
    3127        return context.academics.academics_index_view()
     
    4339        return context.academics_document_view()
    4440    return redirect("%s/academics_contents" % context.absolute_url())
    45 if isStudent:
     41else:
    4642    return redirect("%s/academics_contents" % context.absolute_url())
    4743
  • WAeUP_SRP/trunk/skins/waeup_academics/faculty_index_view.pt

    r598 r600  
    3939
    4040            <td>
    41 <<<<<<< .mine
    4241            <a tal:condition="row/is_editable"
    43 =======
    44             <a tal:condition="row/is_edit_allowed"
    45 >>>>>>> .r597
    4642                href="edit" tal:attributes="href string:${row/url}/external_edit_form"
    4743                target="edit"
  • WAeUP_SRP/trunk/skins/waeup_academics/getCertificateInfo.py

    r577 r600  
    2222member_id = str(member)
    2323roles = member.getRoles()
    24 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
    25 info['is_student'] = 'Student' in roles
     24info['is_manager'] = context.isManager()
     25info['is_student'] = context.isStudent()
    2626info['action'] = "%s" % context.campus.absolute_url()
    2727info['choosen_ids'] = request.get('ids',[])
  • WAeUP_SRP/trunk/skins/waeup_academics/getCoursesCertificatesInfo.py

    r554 r600  
    2222member_id = str(member)
    2323roles = member.getRoles()
    24 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
    25 info['is_student'] = 'Student' in roles
     24info['is_manager'] = context.isManager()
     25info['is_student'] = context.isStudent()
    2626info['action'] = "%s/faculty_index_view" % context.absolute_url()
    2727info['choosen_ids'] = request.get('ids',[])
  • WAeUP_SRP/trunk/skins/waeup_academics/getCoursesInfo.py

    r598 r600  
    2424dep_id = context.aq_parent.getId()
    2525roles = member.getRoles()
    26 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
    27 info['is_student'] = 'Student' in roles
     26info['is_manager'] = context.isManager()
     27info['is_student'] = context.isStudent()
    2828info['action'] = "%s" % context.absolute_url()
    2929info['choosen_ids'] = request.get('ids',[])
  • WAeUP_SRP/trunk/skins/waeup_academics/getDepartmentsInfo.py

    r598 r600  
    2222member_id = str(member)
    2323roles = member.getRolesInContext(context)
    24 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
    25 info['is_student'] = 'Student' in roles
     24info['is_manager'] = context.isManager()
     25info['is_student'] = context.isStudent()
    2626info['action'] = "%s" % context.absolute_url()
    2727info['choosen_ids'] = request.get('ids',[])
  • WAeUP_SRP/trunk/skins/waeup_academics/getFacultiesInfo.py

    r586 r600  
    2222member_id = str(member)
    2323roles = member.getRoles()
    24 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
    25 info['is_student'] = 'Student' in roles
     24info['is_manager'] = context.isManager()
     25info['is_student'] = context.isStudent()
    2626info['action'] = "%s" % context.campus.absolute_url()
    2727info['choosen_ids'] = request.get('ids',[])
  • WAeUP_SRP/trunk/skins/waeup_academics/getLevelInfo.py

    r598 r600  
    3131level_id = pt[-(1+p)]
    3232roles = member.getRoles()
    33 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
    34 info['is_student'] = 'Student' in roles
     33info['is_manager'] = context.isManager()
     34info['is_student'] = context.isStudent()
    3535info['action'] = "%s" % context.absolute_url()
    3636info['choosen_ids'] = request.get('ids',[])
Note: See TracChangeset for help on using the changeset viewer.