Changeset 674 for WAeUP_SRP/trunk


Ignore:
Timestamp:
12 Oct 2006, 20:06:15 (18 years ago)
Author:
joachim
Message:

student-view for manager works again

Location:
WAeUP_SRP/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml

    r671 r674  
    88 <property name="product">WAeUP_SRP</property>
    99 <property name="factory">addStudentAccommodation</property>
    10  <property name="immediate_view">student_index</property>
     10 <property name="immediate_view">academics_document_view</property>
    1111 <property name="global_allow">True</property>
    1212 <property name="filter_content_types">True</property>
     
    2626 <property name="storage_methods"/>
    2727 <property name="cps_is_portlet">False</property>
    28  <alias from="(Default)" to="student_index"/>
    29  <alias from="view" to="student_index"/>
     28 <alias from="(Default)" to="academics_document_view"/>
     29 <alias from="view" to="academics_document_view"/>
    3030 <action title="View" action_id="view" category="object"
    31     condition_expr="" url_expr="string:${object_url}/student_index"
     31    condition_expr="" url_expr="string:${object_url}/academics_document_view"
    3232    visible="True">
    3333  <permission value="View"/>
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r672 r674  
    6666              'StudentPersonal': '',
    6767              }
     68s_view_links = {'StudentApplication': 'application_view',
     69              'StudentAccommodation': 'accommodation_view',
     70              'StudentPersonal': 'personal_view',
     71              }
    6872sos = context.portal_catalog(container_path=student_path)
    6973for so in sos:
     
    7680    row['type'] = so.portal_type
    7781    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])
     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)
     86    se_link = s_edit_links.get(so.portal_type,None)
     87    row['s_edit_link'] = None
     88    if se_link:
     89        row['s_edit_link'] = "%s/%s" % (student.absolute_url(),se_link)
    7990    row['review_state'] = so.review_state
    8091    row['display'] = so.review_state in ('opened','closed')
  • WAeUP_SRP/trunk/skins/waeup_student/student_view.pt

    r672 r674  
    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}">
     25            <td><a href="view" tal:attributes="href string:${row/url}/academics_document_view">
    2626              <strong tal:content="row/title" /></a> </td>
    2727            <td>
     
    3636        </table>
    3737
    38         <table tal:condition="is_student" class="contentListing" width="100%" summary="content layout" id="folder_content">     
    39           <span tal:repeat="row rows">
    40           <tr tal:condition="row/display"
     38    <table tal:condition="is_student" class="contentListing" width="100%" summary="content layout" id="folder_content">     
     39      <span tal:repeat="row rows">
     40        <tr tal:condition="row/display"
    4141            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    42             <td><a href="view" tal:attributes="href string:${row/url}/application_view">
    43               <strong tal:content="row/title" /></a> </td>
    44             <td>
    45             <a tal:condition="row/is_editable"
    46                 href="edit" tal:attributes="href string:${row/s_edit_link}">
    47                 [edit]
     42          <td><a href="view" tal:condition="row/s_view_link"
     43                 tal:attributes="href string:${row/s_view_link}">
     44              <strong tal:content="row/title" /></a>
     45           <strong tal:condition="not:row/s_view_link" tal:content="row/title" />
     46          </td>
     47          <td>
     48            <a tal:condition="python: row['s_edit_link'] and row['is_editable']"
     49               href="edit" tal:attributes="href string:${row/s_edit_link}">
     50              [edit]
    4851            </a>
    49             </td>
    50           </tr>
    51          
    52           <tr tal:condition="python:row['type'] == 'StudentAccommodation' and row['review_state'] in ['opened', 'closed']"
    53             tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    54             <td><a href="view" tal:attributes="href string:${row/url}/accommodation_view">
    55               <strong tal:content="row/title" /></a> </td>
    56             <td>
    57             </td>
    58           </tr>
    59          
    60           </span>
    61         </table>
     52          </td>
     53        </tr>
     54      </span>
     55    </table>
    6256
    6357       
Note: See TracChangeset for help on using the changeset viewer.