source: WAeUP_SRP/base/skins/waeup_utilities/remove_students_form.pt @ 2396

Last change on this file since 2396 was 2396, checked in by joachim, 17 years ago

added remove_students

  • Property svn:keywords set to Id
File size: 7.6 KB
Line 
1<tal:block tal:define="portal_status_message options/psm;
2           students options/students;
3           info options/info|nothing;
4           is_so info/is_so;
5           allowed options/allowed|nothing;"
6           >
7<metal:body use-macro="here/main_template/macros/master">
8  <metal:main fill-slot="main">
9    <span tal:condition="not: allowed">
10      <span tal:content="here/illegal_view" />
11    </span>
12    <span tal:condition="allowed" tal:omit-tag="">
13      <h3> Remove Student Section</h3><br />
14      You are logged in as member <span tal:replace="info/member|nothing" />
15      <form action="remove_students" method="post"
16            enctype="multipart/form-data" class="workflow">
17        <div class="">
18          <div class="documentFields">
19            <table width="" cellpadding="2" cellspacing="2" summary="Form layout">
20              <tr valign="top">
21                <td colspan="1">
22                  <div class=""
23                       id="widget__search_string_widget">
24                    <div class="label">
25                      <label for="search_string">provide a list of student ids  to remove</label>
26                    </div>
27                    <div class="field">
28                      <input name="search_string"
29                             type="text"
30                             id="search_string"
31                             value=""
32                             size="80"
33                             tal:attributes="value info/search_string"/>
34                    </div>
35                  </div>
36                </td>
37              </tr>
38            </table>
39            <input type="submit" class="standalone" name="cpsdocument_edit_button" value="Search" />
40          </div>       
41        </div>
42        <span tal:condition="students">
43          <span
44            tal:define="items students;
45            columns python:3;
46            items_per_page python:40;
47            max_items python:300;
48            zoom python:0;
49            batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
50            batches python:batches_all[0];
51            batch_info python:batches_all[1];
52            zoomed python:batches_all[2];
53            mq nocall:modules/ZTUtils/make_query;"
54            tal:omit-tag=""
55            >
56          <tal:block tal:condition="python: items and batch_info and batch_info['nb_pages'] > 1">
57            <div class="batchLayout">
58              <span i18n:translate="">
59                Objects:
60                <strong>
61                  <tal:block replace="batch_info/start"
62                             i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
63                                                                     i18n:name="batch_limit" />
64                </strong>
65                of <tal:block replace="batch_info/length"
66                              i18n:name="batch_length" />
67              </span>
68            </div>
69            <br />
70          </tal:block>
71            <table class="contentListing" width="100%">
72              <span tal:repeat="rows batches" tal:omit-tag="">
73                <span tal:repeat="student rows">
74                  <tr tal:condition="student"
75                      tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
76                    <td align="left" valign="middle" style="width: 5px;"
77                        tal:condition="is_so">
78                      <input type="checkbox" name="ids:list" value="" id="" class="noborder"
79                             tal:condition="student/show_checkbox"
80                             tal:define="id student/id"
81                             tal:attributes="value id;
82                             id python:'cb_' + id;
83                             checked python:id in info['choosen_ids'];"
84                             />
85                    </td>
86                    <td>
87                      <a href="id" tal:condition="student/show_checkbox"
88                         tal:attributes="href string:${context/portal_url}/campus/students/${student/id}"
89                         tal:content="student/id"></a>
90                      <span tal:content="student/id" tal:condition="not: student/show_checkbox" tal:omit-tag="" />
91                    </td>   
92                    <td>
93                      <span tal:replace="student/name" />
94                    </td>   
95                    <td><span tal:replace="student/matric_no" /></td>   
96                    <td><span tal:replace="student/jamb_reg_no" /></td>
97                  </tr>
98                </span>
99              </span>
100              <tr>
101                <td align="left" valign="top" rowspan="3"></td>
102                <td align="left" valign="top">
103                  <span tal:condition="is_so">
104                    <input type="button" value="button_select_all" class="context"
105                           onclick="someJavaScriptFunctionThatWillBeReplaced"
106                           i18n:attributes="value"
107                           tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
108                           % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
109                           />
110                    <input type="submit" name="delete" value="Delete checked"
111                           class="destructive"
112                           tal:attributes="onclick python:'return window.confirm(\'%s\')' %
113                           (cpsmcat('description_confirm_delete'), )"
114                           />
115                  </span>
116                </td>
117              </tr>
118            </table>
119            <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
120              <div class="pageNavigationLayout">
121                <a tal:define="previous batch_info/previous"
122                   tal:condition="python:previous is not None"
123                   tal:attributes="href python:'%s?%s'%(request['URL'],
124                   mq(request.form, b_start=0))"
125                   >
126                (&lt;&lt;)</a>
127                <a tal:define="previous batch_info/previous"
128                   tal:condition="python:previous is not None"
129                   tal:attributes="href python:'%s?%s'%(request['URL'],
130                   mq(request.form, b_start=previous))"
131                   i18n:translate="batch_previous">Previous</a>
132                <tal:block repeat="page batch_info/pages">
133                  <tal:block condition="python:page != batch_info['start'] - 1">
134                    <a tal:attributes="href python:'%s?%s'%(request['URL'],
135                    mq(request.form, b_start=page))"
136                    tal:content="repeat/page/number">1</a>&nbsp;
137                  </tal:block>
138                  <tal:block condition="python:page == batch_info['start'] - 1">
139                    <span tal:content="string:${repeat/page/number}" />&nbsp;
140                  </tal:block>
141                </tal:block>
142                <a tal:define="next batch_info/next"
143                   tal:condition="python:next is not None"
144                   tal:attributes="href python:'%s?%s'%(request['URL'],
145                   mq(request.form, b_start=next))"
146                   i18n:translate="batch_next">Next</a>
147                <a tal:define="next batch_info/next;
148                last_page python:batch_info['pages'][-1]"
149                tal:condition="python:next is not None"
150                tal:attributes="href python:'%s?%s'%(request['URL'],
151                mq(request.form, b_start=last_page))"
152                >
153                (&gt;&gt;)</a>
154              </div>
155            </tal:block>
156          </span>
157        </span>
158      </form>
159    </span>
160  </metal:main>
161</metal:body>
162</tal:block>
Note: See TracBrowser for help on using the repository browser.