[916] | 1 | <tal:block define="results options/results; |
---|
| 2 | params python:here.getDisplayParams(nb_items=len(results)); |
---|
| 3 | columns python:1; |
---|
| 4 | items_per_page params/items_per_page; |
---|
| 5 | batches_all python:here.getBatchList(results, columns, items_per_page); |
---|
| 6 | batch_list python:batches_all[0]; |
---|
| 7 | batch_info python:batches_all[1]; |
---|
| 8 | form request/form; |
---|
| 9 | mq nocall:modules/ZTUtils/make_query; |
---|
| 10 | portal_url here/portal_url; |
---|
| 11 | dirname here/getId; |
---|
| 12 | title_field here/title_field; |
---|
[1899] | 13 | fields options/result_fields; |
---|
[916] | 14 | isAdmin python:here.portal_membership.getAuthenticatedMember().has_role(['Manager',]); |
---|
| 15 | cpsmcat nocall:here/translation_service; |
---|
| 16 | "> |
---|
| 17 | <div style="padding-left: 1.5em"> |
---|
[953] | 18 | <form action="member_delete" method="post"> |
---|
[916] | 19 | <table tal:condition="results" summary="search result list"> |
---|
| 20 | <tr> |
---|
[2082] | 21 | <th tal:condition="isAdmin"> |
---|
| 22 | |
---|
[916] | 23 | </th> |
---|
| 24 | <tal:block repeat="field fields"> |
---|
| 25 | <th i18n:translate="" tal:content="field/title">id</th> |
---|
| 26 | </tal:block> |
---|
[1958] | 27 | <th>Roles in</th> |
---|
[916] | 28 | </tr> |
---|
| 29 | <tal:block repeat="result python:batch_list[0]"> |
---|
| 30 | <tal:block define="id python:result[0]; |
---|
| 31 | data python:result[1]; |
---|
| 32 | even repeat/result/even; |
---|
| 33 | "> |
---|
| 34 | <tr tal:attributes="class python:test(even, 'even', 'odd')"> |
---|
| 35 | <tal:block repeat="field fields"> |
---|
| 36 | <tal:block tal:condition="isAdmin"> |
---|
| 37 | <td tal:condition="not:repeat/field/index"> |
---|
| 38 | <input type="checkbox" name="ids:list" tal:attributes="value id" /> |
---|
| 39 | </td> |
---|
| 40 | </tal:block> |
---|
| 41 | <td> |
---|
[1899] | 42 | <span tal:condition="repeat/field/start"> |
---|
[916] | 43 | <a href="." |
---|
[921] | 44 | tal:attributes="href string:${portal_url}/member_view?id=${id}" |
---|
[916] | 45 | ><strong tal:content="structure python:data.get(field['id'])">john</strong></a> |
---|
[1899] | 46 | </span> |
---|
| 47 | <span tal:condition="not:repeat/field/start" |
---|
| 48 | tal:content="structure python:data.get(field['id'])" /> |
---|
[916] | 49 | </td> |
---|
| 50 | </tal:block> |
---|
[2082] | 51 | <td nowrap tal:define="roles python:data['roles']"> |
---|
[930] | 52 | <form action="." method="get" |
---|
| 53 | tal:condition="roles" |
---|
| 54 | tal:attributes="action context/portal_url"> |
---|
[2082] | 55 | <select tal:condition="python:0" class="form-element" name=":action" |
---|
[921] | 56 | onChange="location.href='/'+this.options[this.selectedIndex].value" |
---|
| 57 | tal:attributes="onChange string:location.href='${context/portal_url}'+this.options[this.selectedIndex].value"> |
---|
[2082] | 58 | <option value="/search_members_form"> Goto </option> |
---|
| 59 | <option tal:repeat="role roles" value="." |
---|
| 60 | tal:attributes="value string:${role/getPath}/folder_localrole_form"> |
---|
| 61 | <span tal:define="pathobj python:role.getPath().split('/')" |
---|
| 62 | tal:content="python:pathobj[4]+'/'+pathobj[5]+'/'+pathobj[7]+'/'+pathobj[8]" /> |
---|
| 63 | </option> |
---|
[921] | 64 | </select> |
---|
[923] | 65 | <input tal:condition="python:0" class="form-element" type="submit" name="submit" value=" view " /> |
---|
[921] | 66 | </form> |
---|
[2082] | 67 | <span tal:condition="python:1" tal:repeat="role roles"> |
---|
| 68 | <a href="" tal:define="pathobj python:role.getPath().replace('certificates/','').split('/')" |
---|
| 69 | tal:attributes="href string:${role/getPath}/folder_localrole_form"> |
---|
| 70 | <span tal:content="python:pathobj[4]" /> |
---|
| 71 | <span tal:repeat="item python:pathobj[5:]" |
---|
| 72 | tal:content="python:' / '+item" /> |
---|
| 73 | </a><br /> |
---|
[916] | 74 | </span> |
---|
| 75 | </td> |
---|
| 76 | </tr> |
---|
| 77 | </tal:block> |
---|
| 78 | </tal:block> |
---|
| 79 | </table> |
---|
| 80 | <div tal:condition="not:results"> |
---|
| 81 | <span i18n:translate="label_no_results" /> |
---|
| 82 | </div> |
---|
| 83 | <p> |
---|
| 84 | <input type="hidden" name="dirname" tal:attributes="value dirname" /> |
---|
| 85 | <input type="hidden" name="ids:tokens:default" value="" /> |
---|
| 86 | <tal:block condition="python:isAdmin and results"> |
---|
| 87 | <input type="button" value="button_select_all" class="context" |
---|
| 88 | i18n:attributes="value" |
---|
| 89 | tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' |
---|
| 90 | % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" /> |
---|
| 91 | <input type="submit" class="destructive" value="button_delete" |
---|
| 92 | i18n:attributes="value" |
---|
| 93 | tal:attributes="onclick python:'return window.confirm(\'%s\')' |
---|
| 94 | % cpsmcat('description_confirm_delete')" /> |
---|
| 95 | </tal:block> |
---|
| 96 | <input type="button" class="context" value="button_back" |
---|
| 97 | onclick="javascript:history.back()" i18n:attributes="value" /> |
---|
| 98 | </p> |
---|
| 99 | </form> |
---|
| 100 | <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1"> |
---|
| 101 | <br /> |
---|
| 102 | <table width="100%" cellspacing="0" cellpadding="0" |
---|
| 103 | summary="navigation layout"> |
---|
| 104 | <tr class="even"> |
---|
[4305] | 105 | <td style='text-align:center' width="100%"> |
---|
[916] | 106 | <span i18n:translate="label_page">Pages</span>: |
---|
| 107 | <a tal:define="previous batch_info/previous" |
---|
| 108 | tal:condition="python:previous is not None" |
---|
| 109 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
| 110 | mq(request.form, b_start=previous))" |
---|
| 111 | i18n:translate="batch_previous">Previous</a> |
---|
| 112 | <tal:block repeat="page batch_info/pages"> |
---|
| 113 | <a tal:condition="python:page != batch_info['start'] - 1" |
---|
| 114 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
| 115 | mq(request.form, b_start=page))" |
---|
| 116 | tal:content="repeat/page/number">1</a> |
---|
| 117 | <span tal:condition="python:page == batch_info['start'] - 1" |
---|
| 118 | tal:content="string:[${repeat/page/number}]" /> |
---|
| 119 | </tal:block> |
---|
| 120 | <a tal:define="next batch_info/next" |
---|
| 121 | tal:condition="python:next is not None" |
---|
| 122 | tal:attributes="href python:'%s?%s'%(request['URL'], |
---|
| 123 | mq(request.form, b_start=next))" |
---|
| 124 | i18n:translate="batch_next">Next</a> |
---|
| 125 | </td> |
---|
| 126 | </tr> |
---|
| 127 | <tr> |
---|
| 128 | <td> </td> |
---|
| 129 | </tr> |
---|
| 130 | </table> |
---|
| 131 | </tal:block> |
---|
| 132 | </div> |
---|
| 133 | </tal:block> |
---|