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

Last change on this file since 15032 was 4305, checked in by Henrik Bettermann, 15 years ago

replace deprecated align attribute (right and center)

  • Property svn:keywords set to Id
File size: 6.2 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">
22            &nbsp;
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 nowrap tal:define="roles python:data['roles']">
52            <form action="." method="get"
53                  tal:condition="roles"
54                  tal:attributes="action context/portal_url">
55              <select tal:condition="python:0" 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="."
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>
64              </select>
65              <input tal:condition="python:0" class="form-element" type="submit" name="submit" value=" view " />
66            </form>
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 />
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">
105          <td style='text-align:center' width="100%">
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>&nbsp;</td>
129        </tr>
130      </table>
131    </tal:block>
132  </div>
133</tal:block>
Note: See TracBrowser for help on using the repository browser.