source: WAeUP_SRP/trunk/skins/waeup_academics/academics_search_view.pt @ 600

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

added new methods isManager and isStudent, which are now used in all
getXXXInfo Scripts,
searchAcademics Form added - search not working yet.

File size: 4.5 KB
Line 
1<metal:html tal:define="rendered options/rendered;
2            portal_status_message options/psm;
3            objects options/objects;
4            is_manager options/is_manager;"
5            >
6  <metal:body use-macro="here/main_template/macros/master">
7    <metal:block fill-slot="header"
8                 tal:define="creation creation|nothing;
9                 edition edition|nothing;
10                 metadata metadata|nothing"
11                 >
12    </metal:block>
13   
14    <metal:main fill-slot="main">
15      <span tal:condition="not: is_manager">
16        <metal:block use-macro="here/error_not_found/macros/not_found" />
17      </span>
18      <span tal:condition="is_manager"
19        tal:define="items objects;
20        columns python:3;
21        items_per_page python:40;
22        max_items python:300;
23        zoom python:0;
24        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
25        batches python:batches_all[0];
26        batch_info python:batches_all[1];
27        zoomed python:batches_all[2];
28        mq nocall:modules/ZTUtils/make_query;"
29        tal:omit-tag=""
30        >
31        <span tal:replace="structure rendered" />
32        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
33          <div class="batchLayout">
34            <span i18n:translate="">
35              Objects:
36              <strong>
37                <tal:block replace="batch_info/start"
38                           i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
39                                                                   i18n:name="batch_limit" />
40              </strong>
41              of <tal:block replace="batch_info/length"
42                            i18n:name="batch_length" />
43            </span>
44          </div>
45          <br />
46        </tal:block>
47        <table class="contentListing" width="100%">
48          <span tal:repeat="rows batches" tal:omit-tag="">
49            <tr tal:repeat="student rows"
50                tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
51              <td><a href="id" tal:attributes="href string:${student/student/absolute_url}"
52                     tal:content="student/id"></a></td>   
53              <td>
54                <span tal:replace="python: student['per_doc'].firstname" />
55                <span tal:replace="python: student['per_doc'].middlename" />
56                <span tal:replace="python: student['per_doc'].lastname" />
57              </td>   
58              <td><span tal:replace="python: student['app_doc'].jamb_reg_no" /></td>   
59              <td><span tal:replace="student/review_state" /></td>   
60            </tr>
61          </span>
62        </table>
63        <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
64          <div class="pageNavigationLayout">
65            <a tal:define="previous batch_info/previous"
66               tal:condition="python:previous is not None"
67               tal:attributes="href python:'%s?%s'%(request['URL'],
68               mq(request.form, b_start=0))"
69               >
70            (&lt;&lt;)</a>
71            <a tal:define="previous batch_info/previous"
72               tal:condition="python:previous is not None"
73               tal:attributes="href python:'%s?%s'%(request['URL'],
74               mq(request.form, b_start=previous))"
75               i18n:translate="batch_previous">Previous</a>
76            <tal:block repeat="page batch_info/pages">
77              <tal:block condition="python:page != batch_info['start'] - 1">
78                <a tal:attributes="href python:'%s?%s'%(request['URL'],
79                mq(request.form, b_start=page))"
80                tal:content="repeat/page/number">1</a>&nbsp;
81              </tal:block>
82              <tal:block condition="python:page == batch_info['start'] - 1">
83                <span tal:content="string:${repeat/page/number}" />&nbsp;
84              </tal:block>
85            </tal:block>
86            <a tal:define="next batch_info/next"
87               tal:condition="python:next is not None"
88               tal:attributes="href python:'%s?%s'%(request['URL'],
89               mq(request.form, b_start=next))"
90               i18n:translate="batch_next">Next</a>
91            <a tal:define="next batch_info/next;
92            last_page python:batch_info['pages'][-1]"
93            tal:condition="python:next is not None"
94            tal:attributes="href python:'%s?%s'%(request['URL'],
95            mq(request.form, b_start=last_page))"
96            >
97            (&gt;&gt;)</a>
98          </div>
99        </tal:block>
100      </span>
101    </metal:main>
102  </metal:body>
103</metal:html>
104 
Note: See TracBrowser for help on using the repository browser.