source: WAeUP_SRP/branches/regebro-noskins/skins/waeup_directory/search_members_results.pt @ 17952

Last change on this file since 17952 was 953, checked in by Henrik Bettermann, 18 years ago

member directory acl permission, schema and layouts changed
not yet optimized

  • Property svn:keywords set to Id
File size: 5.6 KB
Line 
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;
13  fields python:here.getDirectoryResultFields(dirname);
14  isAdmin python:here.portal_membership.getAuthenticatedMember().has_role(['Manager',]);
15  cpsmcat nocall:here/translation_service;
16  ">
17  <div style="padding-left: 1.5em">
18    <form action="member_delete" method="post">
19      <table tal:condition="results" summary="search result list">
20        <tr>
21          <th tal:condition="isAdmin" i18n:translate="label_selection">
22            Selection
23          </th>
24          <tal:block repeat="field fields">
25            <th i18n:translate="" tal:content="field/title">id</th>
26          </tal:block>
27        <th>Roles In</th>
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>
42                  <a href="."
43                    tal:attributes="href string:${portal_url}/member_view?id=${id}"
44                    ><strong tal:content="structure python:data.get(field['id'])">john</strong></a>
45                </td>
46              </tal:block>
47          <td tal:define="roles python:data['roles']">
48            <form action="." method="get"
49                  tal:condition="roles"
50                  tal:attributes="action context/portal_url">
51              <select class="form-element" name=":action"
52                      onChange="location.href='/'+this.options[this.selectedIndex].value"
53                      tal:attributes="onChange string:location.href='${context/portal_url}'+this.options[this.selectedIndex].value">
54                <option value="/search_members_form">&nbsp;Goto&nbsp;</option>
55                <option tal:repeat="role roles" value="." tal:content="role/getId"
56                        tal:attributes="value string:${role/getPath}/folder_localrole_form"></option>
57              </select>
58              <input tal:condition="python:0" class="form-element" type="submit" name="submit" value=" view " />
59            </form>
60            <span tal:condition="python:0" tal:repeat="role roles">
61              <a href="" tal:attributes="href string:${role/getPath}/folder_localrole_form"
62                 tal:content="role/getId"></a><br />
63            </span>
64          </td>
65        </tr>
66          </tal:block>
67        </tal:block>
68      </table>
69      <div tal:condition="not:results">
70        <span i18n:translate="label_no_results" />
71      </div>
72      <p>
73        <input type="hidden" name="dirname" tal:attributes="value dirname" />
74        <input type="hidden" name="ids:tokens:default" value="" />
75        <tal:block condition="python:isAdmin and results">
76          <input type="button" value="button_select_all" class="context"
77            i18n:attributes="value"
78            tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
79            % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" />
80          <input type="submit" class="destructive" value="button_delete"
81            i18n:attributes="value"
82            tal:attributes="onclick python:'return window.confirm(\'%s\')'
83            % cpsmcat('description_confirm_delete')" />
84        </tal:block>
85        <input type="button" class="context" value="button_back"
86          onclick="javascript:history.back()" i18n:attributes="value" />
87      </p>
88    </form>
89    <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
90      <br />
91      <table width="100%" cellspacing="0" cellpadding="0"
92        summary="navigation layout">
93        <tr class="even">
94          <td align="center" width="100%">
95            <span i18n:translate="label_page">Pages</span>:
96            <a tal:define="previous batch_info/previous"
97               tal:condition="python:previous is not None"
98               tal:attributes="href python:'%s?%s'%(request['URL'],
99                                              mq(request.form, b_start=previous))"
100               i18n:translate="batch_previous">Previous</a>
101            <tal:block repeat="page batch_info/pages">
102              <a tal:condition="python:page != batch_info['start'] - 1"
103                tal:attributes="href python:'%s?%s'%(request['URL'],
104                mq(request.form, b_start=page))"
105                tal:content="repeat/page/number">1</a>
106              <span tal:condition="python:page == batch_info['start'] - 1"
107                tal:content="string:[${repeat/page/number}]" />
108            </tal:block>
109            <a tal:define="next batch_info/next"
110               tal:condition="python:next is not None"
111               tal:attributes="href python:'%s?%s'%(request['URL'],
112                                                  mq(request.form, b_start=next))"
113               i18n:translate="batch_next">Next</a>
114          </td>
115        </tr>
116        <tr>
117          <td>&nbsp;</td>
118        </tr>
119      </table>
120    </tal:block>
121  </div>
122</tal:block>
Note: See TracBrowser for help on using the repository browser.