source: WAeUP_SRP/base/skins/waeup_student/remove_students_form.pt @ 3090

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

allow removal only for deaktivated students

File size: 7.4 KB
Line 
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><span tal:replace="student/review_state" /></td>   
93                    <td>
94                      <span tal:replace="student/name" />
95                    </td>   
96                    <td><span tal:replace="student/matric_no" /></td>   
97                    <td><span tal:replace="student/jamb_reg_no" /></td>
98                  </tr>
99                </span>
100              </span>
101            </table>
102           
103            <br />
104
105           
106            <input type="button" value="button_select_all" class="context"
107                   onclick="someJavaScriptFunctionThatWillBeReplaced"
108                   i18n:attributes="value"
109                   tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
110                   % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
111                   />
112            <input type="submit" name="delete" value="Remove selected"
113                   class="destructive"
114                   tal:attributes="onclick python:'return window.confirm(\'%s\')' %
115                   (cpsmcat('description_confirm_delete'), )"
116                   />
117           
118
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.