Changeset 723 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
19 Oct 2006, 17:06:51 (18 years ago)
Author:
joachim
Message:

Import and Manager view for full-time students + results

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r674 r723  
    2121roles = member.getRoles()
    2222info = {}
    23 info['is_manager'] = context.isManager
     23info['is_manager'] = context.isManager()
    2424info['is_student'] = context.isStudent()
    2525member_id = str(member)
     
    6666              'StudentPersonal': '',
    6767              }
    68 s_view_links = {'StudentApplication': 'application_view',
    69               'StudentAccommodation': 'accommodation_view',
    70               'StudentPersonal': 'personal_view',
     68s_view_links = {'StudentApplication': None,
     69              'StudentAccommodation': None,
     70              'StudentPersonal': None,
     71              'StudentStudyCourse': 'study_course_view',
    7172              }
    7273sos = context.portal_catalog(container_path=student_path)
     
    8081    row['type'] = so.portal_type
    8182    row['is_editable'] = mtool.checkPermission('Modify portal content', soo)
    82     sv_link = s_view_links.get(so.portal_type,None)
    83     row['s_view_link'] = None
    84     if sv_link:
    85         row['s_view_link'] = "%s/%s" % (student.absolute_url(),sv_link)
     83    sv_link = s_view_links.get(so.portal_type,None) or "academics_document_view"
     84    row['s_view_link'] = "%s/%s" % (soo.absolute_url(),sv_link)
    8685    se_link = s_edit_links.get(so.portal_type,None)
    8786    row['s_edit_link'] = None
  • WAeUP_SRP/trunk/skins/waeup_student/student_index.py

    r681 r723  
    2020    return redirect("%s/srp_anonymous_view" % context.absolute_url())
    2121if context.isManager():
     22    if context.portal_type == 'StudentStudyCourse':
     23        return context.study_course_view()
     24    elif context.portal_type == 'StudentStudyLevel':
     25        return context.study_level_view()
    2226    return redirect("%s/student_view" % context.absolute_url())
    2327if context.isStudent():
  • WAeUP_SRP/trunk/skins/waeup_student/student_view.pt

    r674 r723  
    2323          <tr tal:repeat="row rows"
    2424            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    25             <td><a href="view" tal:attributes="href string:${row/url}/academics_document_view">
     25            <td><a href="view" tal:attributes="href string:${row/s_view_link}">
    2626              <strong tal:content="row/title" /></a> </td>
    2727            <td>
Note: See TracChangeset for help on using the changeset viewer.