1 | <metal:html tal:define="info context/getCoursesInfo; |
---|
2 | is_so info/is_so|nothing;" |
---|
3 | > |
---|
4 | <metal:body use-macro="here/waeup_content_master/macros/master"> |
---|
5 | <metal:block fill-slot="header"> |
---|
6 | <a href="" |
---|
7 | tal:attributes="href string:${here/academicsParent}"> |
---|
8 | <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/> |
---|
9 | Up one level |
---|
10 | </a> |
---|
11 | <h3 tal:content="here/title_or_id"> |
---|
12 | Page Title |
---|
13 | </h3> |
---|
14 | <div tal:condition="python:0" tal:content="info/container_path"/> |
---|
15 | <div tal:condition="python:0" tal:content="info/dep_id"/> |
---|
16 | </metal:block> |
---|
17 | <metal:main fill-slot="main" tal:condition="python: 1"> |
---|
18 | <span tal:content="structure python: info['doc'].render(layout_mode='view')" |
---|
19 | tal:omit-tag=""/> |
---|
20 | <span tal:define="items python: info['courses']; |
---|
21 | columns python:3; |
---|
22 | items_per_page python:50; |
---|
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 | <form action="" method="post" class="group" |
---|
32 | tal:attributes="action info/action" |
---|
33 | > |
---|
34 | <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1"> |
---|
35 | <div class="batchLayout"> |
---|
36 | <span i18n:translate=""> |
---|
37 | Objects: |
---|
38 | <strong> |
---|
39 | <tal:block replace="batch_info/start" |
---|
40 | i18n:name="batch_start" /> - <tal:block replace="batch_info/limit" |
---|
41 | i18n:name="batch_limit" /> |
---|
42 | </strong> |
---|
43 | of <tal:block replace="batch_info/length" |
---|
44 | i18n:name="batch_length" /> |
---|
45 | </span> |
---|
46 | </div> |
---|
47 | <br /> |
---|
48 | </tal:block> |
---|
49 | <span tal:condition="python: 0" tal:content="structure rows" /> |
---|
50 | <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content"> |
---|
51 | <span tal:repeat="rows batches" tal:omit-tag=""> |
---|
52 | <tr tal:repeat="row rows" |
---|
53 | tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> |
---|
54 | <td align="left" valign="middle" style="width: 5px;" |
---|
55 | tal:condition="is_so"> |
---|
56 | <input type="checkbox" name="ids:list" value="" id="" class="noborder" |
---|
57 | tal:condition="is_so" |
---|
58 | tal:define="id row/id" |
---|
59 | tal:attributes="value id; |
---|
60 | id python:'cb_' + id; |
---|
61 | checked python:id in info['choosen_ids'];" |
---|
62 | /> |
---|
63 | </td> |
---|
64 | <td><a href="view" tal:attributes="href string:${row/url}"> |
---|
65 | <strong tal:content="row/title" /></a> </td> |
---|
66 | <td tal:content="row/id"> </td> |
---|
67 | <td tal:content="row/semester"> </td> |
---|
68 | <td tal:condition="row/is_editable" tal:content="row/review_state"> </td> |
---|
69 | <td> |
---|
70 | <a tal:condition="row/is_editable" |
---|
71 | href="edit" tal:attributes="href string:${row/url}/external_edit_form" |
---|
72 | target="edit" |
---|
73 | onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"> |
---|
74 | [edit] |
---|
75 | </a> |
---|
76 | </td> |
---|
77 | </tr> |
---|
78 | </span> |
---|
79 | </table> |
---|
80 | <table width="100%" cellspacing="0" cellpadding="2" |
---|
81 | summary="contents of the folder" |
---|
82 | class="folderButtons"> |
---|
83 | <tr> |
---|
84 | <td align="left" valign="top" rowspan="3"></td> |
---|
85 | <td align="left" valign="top"> |
---|
86 | <span tal:condition="is_so"> |
---|
87 | <input type="button" value="button_select_all" class="context" |
---|
88 | onclick="someJavaScriptFunctionThatWillBeReplaced" |
---|
89 | i18n:attributes="value" |
---|
90 | tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' |
---|
91 | % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" |
---|
92 | /> |
---|
93 | <input type="submit" name="approve_checked:method" |
---|
94 | class="context" value="Approve" /> |
---|
95 | <input type="submit" name="retract_checked:method" |
---|
96 | class="context" value="Retract" /> |
---|
97 | <input type="submit" name="folder_delete:method" value="button_delete" |
---|
98 | class="destructive" i18n:attributes="value" |
---|
99 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
100 | (cpsmcat('description_confirm_delete'), )" |
---|
101 | /> |
---|
102 | <input tal:condition="python: context.portal_type not in ('Semester','Certificate')" |
---|
103 | type="submit" name="id_rename_form:method" |
---|
104 | class="context" value="Change Object ID" i18n:attributes="value" |
---|
105 | /> |
---|
106 | </span> |
---|
107 | </td> |
---|
108 | </tr> |
---|
109 | </table> |
---|
110 | <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1"> |
---|
111 | <div class="pageNavigationLayout"> |
---|
112 | <a tal:define="previous batch_info/previous" |
---|
113 | tal:condition="python:previous is not None" |
---|
114 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
115 | mq(request.form, b_start=0))" |
---|
116 | > |
---|
117 | (<<)</a> |
---|
118 | <a tal:define="previous batch_info/previous" |
---|
119 | tal:condition="python:previous is not None" |
---|
120 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
121 | mq(request.form, b_start=previous))" |
---|
122 | i18n:translate="batch_previous">Previous</a> |
---|
123 | <tal:block repeat="page batch_info/pages"> |
---|
124 | <tal:block condition="python:page != batch_info['start'] - 1"> |
---|
125 | <a tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
126 | mq(request.form, b_start=page))" |
---|
127 | tal:content="repeat/page/number">1</a> |
---|
128 | </tal:block> |
---|
129 | <tal:block condition="python:page == batch_info['start'] - 1"> |
---|
130 | <span tal:content="string:${repeat/page/number}" /> |
---|
131 | </tal:block> |
---|
132 | </tal:block> |
---|
133 | <a tal:define="next batch_info/next" |
---|
134 | tal:condition="python:next is not None" |
---|
135 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
136 | mq(request.form, b_start=next))" |
---|
137 | i18n:translate="batch_next">Next</a> |
---|
138 | <a tal:define="next batch_info/next; |
---|
139 | last_page python:batch_info['pages'][-1]" |
---|
140 | tal:condition="python:next is not None" |
---|
141 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
142 | mq(request.form, b_start=last_page))" |
---|
143 | > |
---|
144 | (>>)</a> |
---|
145 | </div> |
---|
146 | </tal:block> |
---|
147 | |
---|
148 | </form> |
---|
149 | </span> |
---|
150 | </metal:main> |
---|
151 | |
---|
152 | <metal:sub fill-slot="sub"/> |
---|
153 | </metal:body> |
---|
154 | </metal:html> |
---|