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

Last change on this file since 1084 was 1081, checked in by joachim, 18 years ago

first version of statistic (already in custom)

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