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"
4 metal:use-macro="here/main_template/macros/master"
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);">
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>
24 <p i18n:translate="description_current_localroles">
25 These users currently have local roles assigned in this folder:
31 action="folder_localrole_edit"
32 tal:attributes="action string:${here/absolute_url}/folder_localrole_edit">
34 <span class="legend" i18n:translate="legend_assigned_roles">
36 <span tal:content="here/title_or_id" i18n:name="folder">title</span>
39 <input type="hidden" name="change_type" value="delete" />
40 <input type="hidden" name="member_role" value="" />
42 <table class="listing" summary="Currently assigned local roles"
43 tal:define="username python:here.portal_membership.getAuthenticatedMember().getUserName();">
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>
53 <tr tal:repeat="lrole python:here.acl_users.getLocalRolesForDisplay(here)">
55 <input class="noborder"
57 name="member_ids:list"
60 tal:condition="python:lrole[0]!=username"
61 tal:attributes="value python:lrole[3];"
65 <td tal:content="python:lrole[0]">
69 <td tal:condition="python:lrole[2]=='group'"
70 i18n:translate="label_group">
73 <td tal:condition="python:lrole[2]=='user'"
74 i18n:translate="label_user">
79 <tal:block tal:repeat="role python:lrole[1]">
80 <span i18n:translate=""
82 tal:omit-tag="">Role</span>
83 <span tal:condition="not: repeat/role/end"
84 tal:omit-tag="">, </span>
91 <input class="context"
93 value="Delete Selected Role(s)"
94 i18n:attributes="value"
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>
106 <metal:block tal:condition="python:test(search_submitted and search_results, 1, 0)">
108 <h1 i18n:translate="heading_search_results">Search results</h1>
110 <p i18n:translate="description_localrole_select_member">
111 Select one or more Members, and a role to assign.
114 <metal:block tal:define="batch python:Batch(search_results, b_size, int(b_start), orphan=3)">
119 action="folder_localrole_edit"
120 tal:attributes="action string:${here/absolute_url}/folder_localrole_edit">
122 <span class="legend" i18n:translate="legend_available_members">
126 <input type="hidden" name="change_type" value="add" />
128 <!-- batch navigation -->
129 <div metal:use-macro="here/batch_macros/macros/navigation" />
131 <table class="listing" summary="Search results">
135 <th i18n:translate="label_user_name">User Name</th>
136 <th i18n:translate="label_email_address">Email Address</th>
140 <tr tal:repeat="member batch">
142 <input class="noborder"
144 name="member_ids:list"
147 tal:attributes="value member/username;"
151 <td tal:content="member/username">username</td>
152 <td tal:content="member/email">email</td>
157 <!-- batch navigation -->
158 <div metal:use-macro="here/batch_macros/macros/navigation" />
162 <div class="label" i18n:translate="label_localrole_to_assign">
167 <select name="member_role">
168 <option tal:repeat="lroles python:container.portal_membership.getCandidateLocalRoles(here)"
169 tal:attributes="value lroles"
180 <div class="label"> </div>
182 <input class="context"
184 value="Assign Local Role to Selected User(s)"
185 i18n:attributes="value"
196 <tal:block tal:condition="python: (not search_submitted or
197 (search_submitted and not search_results))">
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>
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
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.
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
226 action="folder_localrole_form"
227 tal:attributes="action string:${here/absolute_url}/${template/getId}" >
229 <span class="legend" i18n:translate="legend_search_terms">
233 <input type="hidden" name="role_submit" value="role_submit" />
236 <div class="label" i18n:translate="label_search_by">
241 <select name="search_param">
242 <option value="username" i18n:translate="label_user_name">
245 <option value="email" i18n:translate="label_email_address">
254 i18n:translate="label_search_term">
267 <div class="label"> </div>
269 <input class="context"
271 value="Perform Search"
272 i18n:attributes="value"
280 <h1 i18n:translate="heading_available_groups">Available groups</h1>
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.
290 action="folder_localrole_edit"
291 tal:attributes="action string:${here/absolute_url}/folder_localrole_edit">
293 <span class="legend" i18n:translate="legend_available_groups">
297 <input type="hidden" name="change_type" value="add" />
299 <table class="listing" summary="Available groups">
303 <th i18n:translate="">Name</th>
307 <tr tal:repeat="member here/acl_users/getGroups">
309 <input class="noborder"
311 name="member_ids:list"
314 tal:attributes="value member/getUserName;" />
316 <td tal:content="python:member.getUserNameWithoutGroupPrefix()">
324 <div class="label" i18n:translate="label_localrole_to_assign">
329 <select name="member_role">
330 <option tal:repeat="lroles python:container.portal_membership.getCandidateLocalRoles(here)"
331 tal:attributes="value lroles"
341 <div class="label"> </div>
343 <input class="context"
345 value="Assign Local Role to Selected Group(s)"
346 i18n:attributes="value"
355 </div> <!-- fill-slot -->