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">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 | <tr> |
---|
62 | <tal:block define="cell widgets/passport; |
---|
63 | widget cell/widget" |
---|
64 | > |
---|
65 | <div tal:attributes="class cell/widget_css_class|nothing; |
---|
66 | id python:widget.getHtmlWidgetId()+'_widget';"> |
---|
67 | <td valign="top"> |
---|
68 | <tal:block condition="widget/label"> |
---|
69 | <span class="label" |
---|
70 | tal:content="widget/label">label</span>: |
---|
71 | </tal:block> |
---|
72 | </td> |
---|
73 | <td> |
---|
74 | <img src="img" tal:replace="structure cell/widget_rendered"> |
---|
75 | </td> |
---|
76 | </div> |
---|
77 | </tal:block> |
---|
78 | </tr> |
---|
79 | </table> |
---|
80 | </metal:block> |
---|
81 | </metal:define> |
---|