source: WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt @ 1212

Last change on this file since 1212 was 1192, checked in by joachim, 18 years ago

optimize search a little bit

File size: 6.2 KB
Line 
1<metal:html tal:define="rendered options/rendered;
2            portal_status_message options/psm;
3            students options/students;
4            info options/info|nothing;
5            allowed options/allowed|nothing"
6            >
7  <metal:body use-macro="here/main_template/macros/master">
8    <metal:block fill-slot="header"
9                 tal:define="creation creation|nothing;
10                 edition edition|nothing;
11                 metadata metadata|nothing"
12                 >
13    </metal:block>
14   
15    <metal:main fill-slot="main">
16      <span tal:condition="not: allowed">
17        <span tal:content="here/illegal_view" />
18      </span>
19      <span tal:condition="allowed" tal:omit-tag="">
20        <a href="statistics_view"><strong>Student Statistics</strong></a>
21        <h3> Search Student Section</h3><br />
22          You are logged in as member <span tal:replace="info/member|nothing" />
23          <span tal:condition="info/faculties|nothing" tal:omit-tag="">
24            who is ClearanceOfficer for Faculty
25            <span tal:repeat="faculty info/faculties" tal:content="faculty" />
26          </span>
27          <span tal:condition="info/departments|nothing" tal:omit-tag="">
28            and <span tal:repeat="department info/departments|nothing" tal:content="department"/></span>.
29          <br /><br />
30        <span tal:replace="structure rendered" />
31        <span tal:condition="students">
32          <span
33              tal:define="items students;
34              columns python:3;
35              items_per_page python:40;
36              max_items python:300;
37              zoom python:0;
38              batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
39              batches python:batches_all[0];
40              batch_info python:batches_all[1];
41              zoomed python:batches_all[2];
42              mq nocall:modules/ZTUtils/make_query;"
43              tal:omit-tag=""
44              >
45            <tal:block tal:condition="python: items and batch_info and batch_info['nb_pages'] > 1">
46              <div class="batchLayout">
47                <span i18n:translate="">
48                  Objects:
49                  <strong>
50                    <tal:block replace="batch_info/start"
51                               i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
52                                                                       i18n:name="batch_limit" />
53                  </strong>
54                  of <tal:block replace="batch_info/length"
55                                i18n:name="batch_length" />
56                </span>
57              </div>
58              <br />
59            </tal:block>
60            <table class="contentListing" width="100%">
61              <span tal:repeat="rows batches" tal:omit-tag="">
62                <span tal:repeat="student rows">
63                  <tr tal:condition="student"
64                      tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
65                    <td><a href="id" tal:attributes="href string:${context/portal_url}/campus/students/${student/id}"
66                           tal:content="student/id"></a></td>   
67                    <td>
68                      <span tal:replace="student/name" />
69                    </td>   
70                    <td><span tal:replace="student/matric_no" /></td>   
71                    <td><span tal:replace="student/jamb_reg_no" /></td>
72                    <td tal:condition="options/co_view|nothing">
73                      <a href="id"
74                         tal:attributes="href string:${context/portal_url}/campus/students/${student/id}/clearance/external_clearance_edit_form"
75                         target="edit"
76                         onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"
77                         >[view and change state]</a></td>
78                    <td tal:condition="options/co_view|nothing"><span tal:replace="student/review_state|nothing" /></td>   
79                  </tr>
80                </span>
81              </span>
82            </table>
83            <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
84              <div class="pageNavigationLayout">
85                <a tal:define="previous batch_info/previous"
86                   tal:condition="python:previous is not None"
87                   tal:attributes="href python:'%s?%s'%(request['URL'],
88                   mq(request.form, b_start=0))"
89                   >
90                (&lt;&lt;)</a>
91                <a tal:define="previous batch_info/previous"
92                   tal:condition="python:previous is not None"
93                   tal:attributes="href python:'%s?%s'%(request['URL'],
94                   mq(request.form, b_start=previous))"
95                   i18n:translate="batch_previous">Previous</a>
96                <tal:block repeat="page batch_info/pages">
97                  <tal:block condition="python:page != batch_info['start'] - 1">
98                    <a tal:attributes="href python:'%s?%s'%(request['URL'],
99                    mq(request.form, b_start=page))"
100                    tal:content="repeat/page/number">1</a>&nbsp;
101                  </tal:block>
102                  <tal:block condition="python:page == batch_info['start'] - 1">
103                    <span tal:content="string:${repeat/page/number}" />&nbsp;
104                  </tal:block>
105                </tal:block>
106                <a tal:define="next batch_info/next"
107                   tal:condition="python:next is not None"
108                   tal:attributes="href python:'%s?%s'%(request['URL'],
109                   mq(request.form, b_start=next))"
110                   i18n:translate="batch_next">Next</a>
111                <a tal:define="next batch_info/next;
112                last_page python:batch_info['pages'][-1]"
113                tal:condition="python:next is not None"
114                tal:attributes="href python:'%s?%s'%(request['URL'],
115                mq(request.form, b_start=last_page))"
116                >
117                (&gt;&gt;)</a>
118              </div>
119            </tal:block>
120          </span>
121        </span>
122      </span>
123    </metal:main>
124  </metal:body>
125</metal:html>
126 
Note: See TracBrowser for help on using the repository browser.