[3727] | 1 | <!-- a layout_lib macro --> |
---|
| 2 | <!-- $Id: layout_application_view.pt 1435 2007-02-19 10:35:10Z henrik $ --> |
---|
| 3 | |
---|
| 4 | <metal:define tal:define="isStaff context/isStaff; |
---|
| 5 | isStudent context/isStudent;"> |
---|
| 6 | |
---|
| 7 | <metal:block tal:condition="isStaff"> |
---|
| 8 | <metal:block use-macro="here/layout_waeup_lib/macros/table_view"/> |
---|
| 9 | </metal:block> |
---|
| 10 | |
---|
| 11 | <metal:block define-macro="default_view" |
---|
| 12 | tal:condition="isStudent" |
---|
| 13 | tal:define="dm options/datastructure/getDataModel; |
---|
| 14 | layout options/layout; |
---|
| 15 | widgets python:context.getRenderedWidgets(layout); |
---|
| 16 | fields python:('jamb_reg_no', |
---|
| 17 | 'app_ac_pin', |
---|
| 18 | 'app_ac_date', |
---|
| 19 | 'app_email', |
---|
| 20 | 'app_mobile',)" |
---|
| 21 | > |
---|
| 22 | <table cellpadding="2" cellspacing="2" summary="layout"> |
---|
| 23 | <tr> |
---|
| 24 | <td valign="top"><span class="dlabel">Name</span>: |
---|
| 25 | </td> |
---|
| 26 | <td> |
---|
| 27 | <span tal:content="python:context.getStudentBaseInfo()['student']['name']" /> |
---|
| 28 | </td> |
---|
| 29 | </tr> |
---|
| 30 | <tr> |
---|
| 31 | <td valign="top"><span class="dlabel">Sex</span>: |
---|
| 32 | </td> |
---|
| 33 | <td> |
---|
| 34 | <span tal:content="python:context.getStudentBaseInfo()['student']['sex']" /> |
---|
| 35 | </td> |
---|
| 36 | </tr> |
---|
| 37 | <tr valign="top"> |
---|
| 38 | <td><span class="dlabel">Online Student ID</span>: |
---|
| 39 | </td> |
---|
| 40 | <td> |
---|
| 41 | <span tal:content="python:context.getStudentBaseInfo()['id']" /> |
---|
| 42 | </td> |
---|
| 43 | </tr> |
---|
| 44 | <tr tal:repeat="field fields"> |
---|
| 45 | <tal:block tal:define="cell python: widgets[field]"> |
---|
| 46 | <tal:block define="widget cell/widget"> |
---|
| 47 | <div tal:attributes="class cell/widget_css_class|string:label; |
---|
| 48 | id python:widget.getHtmlWidgetId()+'_widget';"> |
---|
| 49 | <td > |
---|
| 50 | <span class="dlabel" |
---|
| 51 | tal:condition="widget/label" |
---|
| 52 | tal:content="widget/label">label</span>: |
---|
| 53 | </td> |
---|
| 54 | <td> |
---|
| 55 | <span tal:replace="structure cell/widget_rendered" /> |
---|
| 56 | </td> |
---|
| 57 | </div> |
---|
| 58 | </tal:block> |
---|
| 59 | </tal:block> |
---|
| 60 | </tr> |
---|
| 61 | </table> |
---|
| 62 | <table width="100%"> |
---|
| 63 | <tr> |
---|
| 64 | <tal:block define="cell widgets/passport; |
---|
| 65 | widget cell/widget" |
---|
| 66 | > |
---|
| 67 | <div tal:attributes="class cell/widget_css_class|nothing; |
---|
| 68 | id python:widget.getHtmlWidgetId()+'_widget';"> |
---|
| 69 | <td valign="top"> |
---|
| 70 | <tal:block condition="widget/label"> |
---|
| 71 | <span class="label" |
---|
| 72 | tal:content="widget/label">label</span>: |
---|
| 73 | </tal:block> |
---|
| 74 | </td> |
---|
| 75 | <td align="right"> |
---|
| 76 | <img src="img" tal:replace="structure cell/widget_rendered"> |
---|
| 77 | </td> |
---|
| 78 | </div> |
---|
| 79 | </tal:block> |
---|
| 80 | </tr> |
---|
| 81 | </table> |
---|
| 82 | </metal:block> |
---|
| 83 | </metal:define> |
---|