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