c4d8e1944fbc142a38f54d9434e02209153ed286
[GroupUserFolder.git] / skins / gruf / folder_localrole_form_plone1.pt
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
3 lang="en-US"
4 metal:use-macro="here/main_template/macros/master"
5 i18n:domain="plone">
6
7 <body>
8
9 <div metal:fill-slot="main"
10 tal:define="Iterator python:modules['Products.CMFPlone'].IndexIterator;
11 Batch python:modules['Products.CMFPlone'].Batch;
12 group_submit request/group_submit|nothing;
13 b_size python:12;b_start python:0;b_start request/b_start | b_start;
14 search_submitted request/role_submit|nothing;
15 search_results python:test(search_submitted, here.portal_membership.searchMembers(
16 search_param=request.get('search_param',''),
17 search_term=request.get('search_term', '') ), None);">
18
19 <h1 i18n:translate="heading_currently_assigned_localroles">
20 Currently assigned local roles in folder
21 <span tal:content="here/title_or_id" i18n:name="folder">title</span>
22 </h1>
23
24 <p i18n:translate="description_current_localroles">
25 These users currently have local roles assigned in this folder:
26 </p>
27
28 <form class="group"
29 method="post"
30 name="deleterole"
31 action="folder_localrole_edit"
32 tal:attributes="action string:${here/absolute_url}/folder_localrole_edit">
33
34 <span class="legend" i18n:translate="legend_assigned_roles">
35 Assigned Roles
36 <span tal:content="here/title_or_id" i18n:name="folder">title</span>
37 </span>
38
39 <input type="hidden" name="change_type" value="delete" />
40 <input type="hidden" name="member_role" value="" />
41
42 <table class="listing" summary="Currently assigned local roles"
43 tal:define="username python:here.portal_membership.getAuthenticatedMember().getUserName();">
44 <thead>
45 <tr>
46 <th>&nbsp;</th>
47 <th i18n:translate="label_user_group_name">User/Group name</th>
48 <th i18n:translate="label_type">Type</th>
49 <th i18n:translate="label_roles">Role(s)</th>
50 </tr>
51 </thead>
52 <tbody>
53 <tr tal:repeat="lrole python:here.acl_users.getLocalRolesForDisplay(here)">
54 <td>
55 <input class="noborder"
56 type="checkbox"
57 name="member_ids:list"
58 id="#"
59 value=""
60 tal:condition="python:lrole[0]!=username"
61 tal:attributes="value python:lrole[3];"
62 />
63 </td>
64
65 <td tal:content="python:lrole[0]">
66 groupname
67 </td>
68
69 <td tal:condition="python:lrole[2]=='group'"
70 i18n:translate="label_group">
71 Group
72 </td>
73 <td tal:condition="python:lrole[2]=='user'"
74 i18n:translate="label_user">
75 User
76 </td>
77
78 <td>
79 <tal:block tal:repeat="role python:lrole[1]">
80 <span i18n:translate=""
81 tal:content="role"
82 tal:omit-tag="">Role</span>
83 <span tal:condition="not: repeat/role/end"
84 tal:omit-tag="">, </span>
85 </tal:block>
86 </td>
87 </tr>
88 </tbody>
89 </table>
90
91 <input class="context"
92 type="submit"
93 value="Delete Selected Role(s)"
94 i18n:attributes="value"
95 />
96 </form>
97
98 <metal:block tal:condition="python:test(search_submitted and not search_results, 1, 0)">
99 <h1 i18n:translate="heading_search_results">Search results</h1>
100 <p i18n:translate="no_members_found">
101 No members were found using your <strong>Search Criteria</strong>
102 </p>
103 <hr />
104 </metal:block>
105
106 <metal:block tal:condition="python:test(search_submitted and search_results, 1, 0)">
107
108 <h1 i18n:translate="heading_search_results">Search results</h1>
109
110 <p i18n:translate="description_localrole_select_member">
111 Select one or more Members, and a role to assign.
112 </p>
113
114 <metal:block tal:define="batch python:Batch(search_results, b_size, int(b_start), orphan=3)">
115
116 <form class="group"
117 method="post"
118 name="change_type"
119 action="folder_localrole_edit"
120 tal:attributes="action string:${here/absolute_url}/folder_localrole_edit">
121
122 <span class="legend" i18n:translate="legend_available_members">
123 Available Members
124 </span>
125
126 <input type="hidden" name="change_type" value="add" />
127
128 <!-- batch navigation -->
129 <div metal:use-macro="here/batch_macros/macros/navigation" />
130
131 <table class="listing" summary="Search results">
132 <thead>
133 <tr>
134 <th>&nbsp;</th>
135 <th i18n:translate="label_user_name">User Name</th>
136 <th i18n:translate="label_email_address">Email Address</th>
137 </tr>
138 </thead>
139 <tbody>
140 <tr tal:repeat="member batch">
141 <td>
142 <input class="noborder"
143 type="checkbox"
144 name="member_ids:list"
145 id="#"
146 value=""
147 tal:attributes="value member/username;"
148 />
149 </td>
150
151 <td tal:content="member/username">username</td>
152 <td tal:content="member/email">email</td>
153 </tr>
154 </tbody>
155 </table>
156
157 <!-- batch navigation -->
158 <div metal:use-macro="here/batch_macros/macros/navigation" />
159
160 <div class="row">
161
162 <div class="label" i18n:translate="label_localrole_to_assign">
163 Role to assign
164 </div>
165
166 <div class="field">
167 <select name="member_role">
168 <option tal:repeat="lroles python:container.portal_membership.getCandidateLocalRoles(here)"
169 tal:attributes="value lroles"
170 tal:content="lroles"
171 i18n:translate="">
172 Role name
173 </option>
174 </select>
175 </div>
176
177 </div>
178
179 <div class="row">
180 <div class="label">&nbsp;</div>
181 <div class="field">
182 <input class="context"
183 type="submit"
184 value="Assign Local Role to Selected User(s)"
185 i18n:attributes="value"
186 />
187 </div>
188 </div>
189
190 </form>
191
192 </metal:block>
193 </metal:block>
194
195 <div>
196 <tal:block tal:condition="python: (not search_submitted or
197 (search_submitted and not search_results))">
198
199 <h1 i18n:translate="heading_assign_localrole">
200 Assign local roles to folder
201 <tal:block tal:content="here/title_or_id" i18n:name="folder">title</tal:block>
202 </h1>
203
204 <p i18n:translate="description_assign_localrole">
205 A local role is a way of allowing other users into some or
206 all of your folders. These users can edit items, publish
207 them - et cetera, depending on what permissions you give
208 them.
209 <br />
210
211 Local roles are ideal in cooperation projects, and as every
212 item has a history and an undo option, it's easy to keep
213 track of the changes.
214
215 <br />
216
217 To give a person a local role in this folder, just search
218 for the person's name or email address in the form below,
219 and you will be presented with a page that will show you the
220 options available.
221 </p>
222
223 <form class="group"
224 method="post"
225 name="localrole"
226 action="folder_localrole_form"
227 tal:attributes="action string:${here/absolute_url}/${template/getId}" >
228
229 <span class="legend" i18n:translate="legend_search_terms">
230 Search Terms
231 </span>
232
233 <input type="hidden" name="role_submit" value="role_submit" />
234
235 <div class="row">
236 <div class="label" i18n:translate="label_search_by">
237 Search by
238 </div>
239
240 <div class="field">
241 <select name="search_param">
242 <option value="username" i18n:translate="label_user_name">
243 User Name
244 </option>
245 <option value="email" i18n:translate="label_email_address">
246 Email Address
247 </option>
248 </select>
249 </div>
250 </div>
251
252 <div class="row">
253 <div class="label"
254 i18n:translate="label_search_term">
255 Search Term
256 </div>
257
258 <div class="field">
259 <input type="text"
260 name="search_term"
261 size="30"
262 />
263 </div>
264 </div>
265
266 <div class="row">
267 <div class="label">&nbsp;</div>
268 <div class="field">
269 <input class="context"
270 type="submit"
271 value="Perform Search"
272 i18n:attributes="value"
273 />
274 </div>
275 </div>
276
277 </form>
278 </tal:block>
279
280 <h1 i18n:translate="heading_available_groups">Available groups</h1>
281
282 <p i18n:translate="description_available_groups">
283 Groups are a convenient way to assign roles to a common set of
284 users. Select one or more Groups, and a role to assign.
285 </p>
286
287 <form class="group"
288 method="post"
289 name="change_type"
290 action="folder_localrole_edit"
291 tal:attributes="action string:${here/absolute_url}/folder_localrole_edit">
292
293 <span class="legend" i18n:translate="legend_available_groups">
294 Available Groups
295 </span>
296
297 <input type="hidden" name="change_type" value="add" />
298
299 <table class="listing" summary="Available groups">
300 <thead>
301 <tr>
302 <th>&nbsp;</th>
303 <th i18n:translate="">Name</th>
304 </tr>
305 </thead>
306 <tbody>
307 <tr tal:repeat="member here/acl_users/getGroups">
308 <td>
309 <input class="noborder"
310 type="checkbox"
311 name="member_ids:list"
312 id="#"
313 value=""
314 tal:attributes="value member/getUserName;" />
315 </td>
316 <td tal:content="python:member.getUserNameWithoutGroupPrefix()">
317 groupname
318 </td>
319 </tr>
320 </tbody>
321 </table>
322
323 <div class="row">
324 <div class="label" i18n:translate="label_localrole_to_assign">
325 Role to assign
326 </div>
327
328 <div class="field">
329 <select name="member_role">
330 <option tal:repeat="lroles python:container.portal_membership.getCandidateLocalRoles(here)"
331 tal:attributes="value lroles"
332 tal:content="lroles"
333 i18n:translate="">
334 Role name
335 </option>
336 </select>
337 </div>
338 </div>
339
340 <div class="row">
341 <div class="label">&nbsp;</div>
342 <div class="field">
343 <input class="context"
344 type="submit"
345 value="Assign Local Role to Selected Group(s)"
346 i18n:attributes="value"
347 />
348 </div>
349 </div>
350
351 </form>
352
353 </div>
354
355 </div> <!-- fill-slot -->
356
357 </body>
358 </html>