1 | <tal:block tal:define="portal_status_message options/psm; |
---|
2 | students options/students; |
---|
3 | info options/info|nothing; |
---|
4 | allowed options/allowed|nothing;" |
---|
5 | > |
---|
6 | <metal:body use-macro="here/main_template/macros/master"> |
---|
7 | <metal:main fill-slot="main"> |
---|
8 | <span tal:condition="not: allowed"> |
---|
9 | <span tal:content="here/illegal_view" /> |
---|
10 | </span> |
---|
11 | <span tal:condition="allowed" tal:omit-tag=""> |
---|
12 | <h3> Remove Student Records</h3><br /> |
---|
13 | You are logged in as member <span tal:replace="info/member|nothing" /> |
---|
14 | <br /><br /> |
---|
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">Student Ids to be removed</label> (space-separated list) |
---|
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 | <br /><br /> |
---|
43 | <span tal:condition="students"> |
---|
44 | <span |
---|
45 | tal:define="items students; |
---|
46 | columns python:3; |
---|
47 | items_per_page python:40; |
---|
48 | max_items python:300; |
---|
49 | zoom python:0; |
---|
50 | batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400); |
---|
51 | batches python:batches_all[0]; |
---|
52 | batch_info python:batches_all[1]; |
---|
53 | zoomed python:batches_all[2]; |
---|
54 | mq nocall:modules/ZTUtils/make_query;" |
---|
55 | tal:omit-tag="" |
---|
56 | > |
---|
57 | <tal:block tal:condition="python: items and batch_info and batch_info['nb_pages'] > 1"> |
---|
58 | <div class="batchLayout"> |
---|
59 | <span i18n:translate=""> |
---|
60 | Objects: |
---|
61 | <strong> |
---|
62 | <tal:block replace="batch_info/start" |
---|
63 | i18n:name="batch_start" /> - <tal:block replace="batch_info/limit" |
---|
64 | i18n:name="batch_limit" /> |
---|
65 | </strong> |
---|
66 | of <tal:block replace="batch_info/length" |
---|
67 | i18n:name="batch_length" /> |
---|
68 | </span> |
---|
69 | </div> |
---|
70 | <br /> |
---|
71 | </tal:block> |
---|
72 | <table class="contentListing" width="100%"> |
---|
73 | <span tal:repeat="rows batches" tal:omit-tag=""> |
---|
74 | <span tal:repeat="student rows"> |
---|
75 | <tr tal:condition="student" |
---|
76 | tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')"> |
---|
77 | <td align="left" valign="middle" style="width: 5px;"> |
---|
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 | </table> |
---|
101 | |
---|
102 | <br /> |
---|
103 | |
---|
104 | |
---|
105 | <input type="button" value="button_select_all" class="context" |
---|
106 | onclick="someJavaScriptFunctionThatWillBeReplaced" |
---|
107 | i18n:attributes="value" |
---|
108 | tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' |
---|
109 | % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" |
---|
110 | /> |
---|
111 | <input type="submit" name="delete" value="Remove selected" |
---|
112 | class="destructive" |
---|
113 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
114 | (cpsmcat('description_confirm_delete'), )" |
---|
115 | /> |
---|
116 | |
---|
117 | |
---|
118 | <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1"> |
---|
119 | <div class="pageNavigationLayout"> |
---|
120 | <a tal:define="previous batch_info/previous" |
---|
121 | tal:condition="python:previous is not None" |
---|
122 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
123 | mq(request.form, b_start=0))" |
---|
124 | > |
---|
125 | (<<)</a> |
---|
126 | <a tal:define="previous batch_info/previous" |
---|
127 | tal:condition="python:previous is not None" |
---|
128 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
129 | mq(request.form, b_start=previous))" |
---|
130 | i18n:translate="batch_previous">Previous</a> |
---|
131 | <tal:block repeat="page batch_info/pages"> |
---|
132 | <tal:block condition="python:page != batch_info['start'] - 1"> |
---|
133 | <a tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
134 | mq(request.form, b_start=page))" |
---|
135 | tal:content="repeat/page/number">1</a> |
---|
136 | </tal:block> |
---|
137 | <tal:block condition="python:page == batch_info['start'] - 1"> |
---|
138 | <span tal:content="string:${repeat/page/number}" /> |
---|
139 | </tal:block> |
---|
140 | </tal:block> |
---|
141 | <a tal:define="next batch_info/next" |
---|
142 | tal:condition="python:next is not None" |
---|
143 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
144 | mq(request.form, b_start=next))" |
---|
145 | i18n:translate="batch_next">Next</a> |
---|
146 | <a tal:define="next batch_info/next; |
---|
147 | last_page python:batch_info['pages'][-1]" |
---|
148 | tal:condition="python:next is not None" |
---|
149 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
150 | mq(request.form, b_start=last_page))" |
---|
151 | > |
---|
152 | (>>)</a> |
---|
153 | </div> |
---|
154 | </tal:block> |
---|
155 | </span> |
---|
156 | </span> |
---|
157 | </form> |
---|
158 | </span> |
---|
159 | </metal:main> |
---|
160 | </metal:body> |
---|
161 | </tal:block> |
---|