Ignore:
Timestamp:
12 Oct 2006, 18:23:28 (18 years ago)
Author:
joachim
Message:

several simplifications to student_index, student_edit must be called instead of passport_entry_view

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

Legend:

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

    r662 r672  
    6262
    6363items = []
     64s_edit_links = {'StudentApplication': 'student_edit',
     65              'StudentAccommodation': '',
     66              'StudentPersonal': '',
     67              }
    6468sos = context.portal_catalog(container_path=student_path)
    6569for so in sos:
     
    7276    row['type'] = so.portal_type
    7377    row['is_editable'] = mtool.checkPermission('Modify portal content', soo)
     78    row['s_edit_link'] = "%s/%s" % (student.absolute_url(),s_edit_links[so.portal_type])
    7479    row['review_state'] = so.review_state
     80    row['display'] = so.review_state in ('opened','closed')
    7581    items.append(row)
    7682info['items'] = items
  • WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt

    r635 r672  
    1515  widgets python:context.getRenderedWidgets(layout);
    1616  ">
    17   <span tal:condition="python: 0" tal:replace="structure widgets" />
    1817  <form action="" id="editForm" method="post"
    1918        enctype="multipart/form-data" class="workflow"
    2019        tal:attributes="action formaction"
    21        
    2220        >
    2321  <table class="layoutDefault" summary="Form layout"
     
    7169      </span>
    7270    </span>
    73     <tr tal:condition="widgets/passport|nothing" tal:define="cell widgets/passport|nothing;">
     71    <tr tal:condition="widgets/passport|nothing"
     72        tal:define="cell widgets/passport|nothing;">
    7473      <tal:block tal:define="widget cell/widget;
    7574      wid widget/getWidgetId;
  • WAeUP_SRP/trunk/skins/waeup_student/passport_entry_view.pt

    r670 r672  
    1515              tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
    1616              layout_mode='edit',
    17               layout_id='student_application_fe')"
     17              layout_id='student_application_fe',
     18              )"
    1819              />
    1920      </span>
  • WAeUP_SRP/trunk/skins/waeup_student/student_view.pt

    r662 r672  
    3838        <table tal:condition="is_student" class="contentListing" width="100%" summary="content layout" id="folder_content">     
    3939          <span tal:repeat="row rows">
    40           <tr tal:condition="python:row['type'] == 'StudentApplication' and row['review_state'] in ['opened', 'closed']"
     40          <tr tal:condition="row/display"
    4141            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    4242            <td><a href="view" tal:attributes="href string:${row/url}/application_view">
     
    4444            <td>
    4545            <a tal:condition="row/is_editable"
    46                 href="edit" tal:attributes="href string:${info/url}/passport_entry_view">
     46                href="edit" tal:attributes="href string:${row/s_edit_link}">
    4747                [edit]
    4848            </a>
Note: See TracChangeset for help on using the changeset viewer.