source: WAeUP_SRP/trunk/skins/waeup_directory/search_members_results.pt @ 924

Last change on this file since 924 was 923, checked in by joachim, 18 years ago

added member_edit-functions

  • Property svn:keywords set to Id
File size: 5.5 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="cpsdirectory_entry_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" tal:attributes="action context/portal_url">
49              <select class="form-element" name=":action"
50                      onChange="location.href='/'+this.options[this.selectedIndex].value"
51                      tal:attributes="onChange string:location.href='${context/portal_url}'+this.options[this.selectedIndex].value">
52                <option value="/search_members_form">Goto</option>
53                <option tal:repeat="role roles" value="." tal:content="role/getId"
54                        tal:attributes="value string:${role/getPath}/folder_localrole_form"></option>
55              </select>
56              <input tal:condition="python:0" class="form-element" type="submit" name="submit" value=" view " />
57            </form>
58            <span tal:condition="python:0" tal:repeat="role roles">
59              <a href="" tal:attributes="href string:${role/getPath}/folder_localrole_form"
60                 tal:content="role/getId"></a><br />
61            </span>
62          </td>
63        </tr>
64          </tal:block>
65        </tal:block>
66      </table>
67      <div tal:condition="not:results">
68        <span i18n:translate="label_no_results" />
69      </div>
70      <p>
71        <input type="hidden" name="dirname" tal:attributes="value dirname" />
72        <input type="hidden" name="ids:tokens:default" value="" />
73        <tal:block condition="python:isAdmin and results">
74          <input type="button" value="button_select_all" class="context"
75            i18n:attributes="value"
76            tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
77            % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" />
78          <input type="submit" class="destructive" value="button_delete"
79            i18n:attributes="value"
80            tal:attributes="onclick python:'return window.confirm(\'%s\')'
81            % cpsmcat('description_confirm_delete')" />
82        </tal:block>
83        <input type="button" class="context" value="button_back"
84          onclick="javascript:history.back()" i18n:attributes="value" />
85      </p>
86    </form>
87    <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
88      <br />
89      <table width="100%" cellspacing="0" cellpadding="0"
90        summary="navigation layout">
91        <tr class="even">
92          <td align="center" width="100%">
93            <span i18n:translate="label_page">Pages</span>:
94            <a tal:define="previous batch_info/previous"
95               tal:condition="python:previous is not None"
96               tal:attributes="href python:'%s?%s'%(request['URL'],
97                                              mq(request.form, b_start=previous))"
98               i18n:translate="batch_previous">Previous</a>
99            <tal:block repeat="page batch_info/pages">
100              <a tal:condition="python:page != batch_info['start'] - 1"
101                tal:attributes="href python:'%s?%s'%(request['URL'],
102                mq(request.form, b_start=page))"
103                tal:content="repeat/page/number">1</a>
104              <span tal:condition="python:page == batch_info['start'] - 1"
105                tal:content="string:[${repeat/page/number}]" />
106            </tal:block>
107            <a tal:define="next batch_info/next"
108               tal:condition="python:next is not None"
109               tal:attributes="href python:'%s?%s'%(request['URL'],
110                                                  mq(request.form, b_start=next))"
111               i18n:translate="batch_next">Next</a>
112          </td>
113        </tr>
114        <tr>
115          <td>&nbsp;</td>
116        </tr>
117      </table>
118    </tal:block>
119  </div>
120</tal:block>
Note: See TracBrowser for help on using the repository browser.