1 | <metal:html tal:define="info context/getCoursesInfo; |
---|
2 | is_manager info/is_manager|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_manager"> |
---|
56 | <input type="checkbox" name="ids:list" value="" id="" class="noborder" |
---|
57 | tal:condition="is_manager" |
---|
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:condition="row/is_editable" tal:content="row/review_state"> </td> |
---|
68 | <td> |
---|
69 | <a tal:condition="row/is_editable" |
---|
70 | href="edit" tal:attributes="href string:${row/url}/external_edit_form" |
---|
71 | target="edit" |
---|
72 | 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')"> |
---|
73 | [edit] |
---|
74 | </a> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | </span> |
---|
78 | </table> |
---|
79 | <table width="100%" cellspacing="0" cellpadding="2" |
---|
80 | summary="contents of the folder" |
---|
81 | class="folderButtons"> |
---|
82 | <tr> |
---|
83 | <td align="left" valign="top" rowspan="3"></td> |
---|
84 | <td align="left" valign="top"> |
---|
85 | <span tal:condition="is_manager"> |
---|
86 | <input type="button" value="button_select_all" class="context" |
---|
87 | onclick="someJavaScriptFunctionThatWillBeReplaced" |
---|
88 | i18n:attributes="value" |
---|
89 | tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' |
---|
90 | % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" |
---|
91 | /> |
---|
92 | <input type="submit" name="approve_checked:method" |
---|
93 | class="context" value="Approve" /> |
---|
94 | <input type="submit" name="retract_checked:method" |
---|
95 | class="context" value="Retract" /> |
---|
96 | <input type="submit" name="folder_delete:method" value="button_delete" |
---|
97 | class="destructive" i18n:attributes="value" |
---|
98 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
99 | (cpsmcat('description_confirm_delete'), )" |
---|
100 | /> |
---|
101 | <input tal:condition="python: context.portal_type not in ('Semester','Certificate')" |
---|
102 | type="submit" name="id_rename_form:method" |
---|
103 | class="context" value="Change Object ID" i18n:attributes="value" |
---|
104 | /> |
---|
105 | </span> |
---|
106 | </td> |
---|
107 | </tr> |
---|
108 | </table> |
---|
109 | <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1"> |
---|
110 | <div class="pageNavigationLayout"> |
---|
111 | <a tal:define="previous batch_info/previous" |
---|
112 | tal:condition="python:previous is not None" |
---|
113 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
114 | mq(request.form, b_start=0))" |
---|
115 | > |
---|
116 | (<<)</a> |
---|
117 | <a tal:define="previous batch_info/previous" |
---|
118 | tal:condition="python:previous is not None" |
---|
119 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
120 | mq(request.form, b_start=previous))" |
---|
121 | i18n:translate="batch_previous">Previous</a> |
---|
122 | <tal:block repeat="page batch_info/pages"> |
---|
123 | <tal:block condition="python:page != batch_info['start'] - 1"> |
---|
124 | <a tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
125 | mq(request.form, b_start=page))" |
---|
126 | tal:content="repeat/page/number">1</a> |
---|
127 | </tal:block> |
---|
128 | <tal:block condition="python:page == batch_info['start'] - 1"> |
---|
129 | <span tal:content="string:${repeat/page/number}" /> |
---|
130 | </tal:block> |
---|
131 | </tal:block> |
---|
132 | <a tal:define="next batch_info/next" |
---|
133 | tal:condition="python:next is not None" |
---|
134 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
135 | mq(request.form, b_start=next))" |
---|
136 | i18n:translate="batch_next">Next</a> |
---|
137 | <a tal:define="next batch_info/next; |
---|
138 | last_page python:batch_info['pages'][-1]" |
---|
139 | tal:condition="python:next is not None" |
---|
140 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
141 | mq(request.form, b_start=last_page))" |
---|
142 | > |
---|
143 | (>>)</a> |
---|
144 | </div> |
---|
145 | </tal:block> |
---|
146 | |
---|
147 | </form> |
---|
148 | </span> |
---|
149 | </metal:main> |
---|
150 | |
---|
151 | <metal:sub fill-slot="sub"/> |
---|
152 | </metal:body> |
---|
153 | </metal:html> |
---|