source: WAeUP_SRP/trunk/skins/waeup_student/deactivate_students_form.pt @ 6957

Last change on this file since 6957 was 2601, checked in by Henrik Bettermann, 17 years ago

close also objects in state created

  • Property svn:keywords set to Id
File size: 7.3 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> Deactivate Student Records</h3><br />
13
14      <form action="deactivate_students" method="post"
15            enctype="multipart/form-data" class="workflow">
16        <div class="">
17          <div class="documentFields">
18            <table width="" cellpadding="2" cellspacing="2" summary="Form layout">
19              <tr valign="top">
20                <td colspan="1">
21                  <div class=""
22                       id="widget__search_string_widget">
23                    <div class="label">
24                      <label for="search_string">Student Ids to be deactivated</label> (space-separated list)
25                    </div>
26                    <div class="field">
27                      <input name="search_string"
28                             type="text"
29                             id="search_string"
30                             value=""
31                             size="80"
32                             tal:attributes="value info/search_string"/>
33                    </div>
34                  </div>
35                </td>
36              </tr>
37            </table>
38            <input type="submit" class="standalone" name="cpsdocument_edit_button" value="Search" />
39          </div>       
40        </div>
41        <br /><br />
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                      <input type="checkbox" name="ids:list" value="" id="" class="noborder"
78                             tal:condition="student/show_checkbox"
79                             tal:define="id student/id"
80                             tal:attributes="value id;
81                             id python:'cb_' + id;
82                             checked python:id in info['choosen_ids'];"
83                             />
84                    </td>
85                    <td>
86                      <a href="id" tal:condition="student/show_checkbox"
87                         tal:attributes="href string:${context/portal_url}/campus/students/${student/id}"
88                         tal:content="student/id"></a>
89                      <span tal:content="student/id" tal:condition="not: student/show_checkbox" tal:omit-tag="" />
90                    </td>   
91                    <td><span tal:replace="student/review_state" /></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="Deactivate 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                (&lt;&lt;)</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>&nbsp;
136                  </tal:block>
137                  <tal:block condition="python:page == batch_info['start'] - 1">
138                    <span tal:content="string:${repeat/page/number}" />&nbsp;
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                (&gt;&gt;)</a>
153              </div>
154            </tal:block>
155          </span>
156        </span>
157      </form>
158    </span>
159  </metal:main>
160</metal:body>
161</tal:block>
Note: See TracBrowser for help on using the repository browser.