source: WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_directory/search_members_results.pt @ 11107

Last change on this file since 11107 was 1958, checked in by Henrik Bettermann, 17 years ago

correct spelling of first, middle, last and full name

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