Changeset 1186 for WAeUP_SRP/trunk


Ignore:
Timestamp:
3 Jan 2007, 18:08:07 (18 years ago)
Author:
joachim
Message:

optimized personal_view

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

Legend:

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

    r1167 r1186  
    3838students_object = context.portal_url.getPortalObject().campus.students
    3939student = getattr(students_object, student_id)
    40 info['id'] = student_id
    41 info['student'] = student
    42 info['review_state'] = wf.getInfoFor(student,'review_state',None)
    43 info['per'] = student.personal
     40#info['id'] = student_id
     41#info['student'] = student
     42res = context.portal_catalog(portal_type='Student',id = student_id)
     43if res:
     44    info['review_state'] = res[0].review_state
     45#info['review_state'] = wf.getInfoFor(student,'review_state',None)
     46#info['per'] = student.personal
    4447info['per_doc'] = student.personal.getContent()
    4548return info
  • WAeUP_SRP/trunk/skins/waeup_student/layout_personal_view.pt

    r1167 r1186  
    33<metal:block define-macro="default_view"
    44  tal:define="layout options/layout;
    5               dm options/datastructure/getDataModel;
    6               widgets python:context.getRenderedWidgets(layout);
    7               fields_not_displayed python:('',)" >
     5              dm options/datastructure/getDataModel;">
    86
    97  <table cellpadding="2" cellspacing="2" summary="layout">
     
    1210      </td>
    1311      <td>
    14          <span tal:replace="python:here.aq_parent.aq_parent.id" />
     12         <span tal:replace="context/getStudentId" />
    1513      </td>     
    1614    </tr>
    17    
    1815    <span tal:repeat="row layout/rows">
    1916        <span tal:repeat="cell row">
    2017          <span tal:condition="python:cell['widget_rendered']
    21                                and not cell['widget_rendered'] in ('None','-',)
    2218                               or cell['widget_id'] == 'birth_certificate'">
    23           <span tal:define="widget cell/widget"
    24                 tal:condition="python:cell['widget_id'] not in fields_not_displayed">
     19          <span tal:define="widget cell/widget">
    2520            <div tal:omit-tag=""
    2621                 tal:attributes="class cell/widget_css_class|nothing;">
    27                  
    2822            <tr>                         
    2923            <tal:block condition="widget/label">
  • WAeUP_SRP/trunk/skins/waeup_student/personal_view.pt

    r1171 r1186  
    1111      <span tal:condition="info"
    1212            tal:define="review_state info/review_state">
    13            
    14 
    1513        <h3>My Personal Record</h3>
    1614        <br />
    1715        <span tal:omit-tag=""
    18               tal:content="structure python: info['per_doc'].render(proxy=info['per_doc'],
     16              tal:content="structure python: info['per_doc'].render(
    1917              layout_mode='view',
    2018              layout_id='student_personal_fe')"
Note: See TracChangeset for help on using the changeset viewer.