<metal:block use-macro="python:here.getFormsTool().getForm('site_admin_users').macros['page']">
<metal:block fill-slot="second-title" i18n:translate="">Roles</metal:block>

<metal:block fill-slot="buttons"></metal:block>
<metal:block fill-slot="second-tabs"></metal:block>

<metal:block fill-slot="section-title">
</metal:block>

<metal:block fill-slot="description-text">
</metal:block>

<metal:block fill-slot="content"><metal:block define-macro="content">
<tal:block define="site_path python:here.getSitePath();
						source_url string:${site_path}/admin_roles_html;
						section python:request.get('section', 'list');">

	<div class="cleaner"></div>

	<div id="add-role-form" class="cleaner assign-form">
		<form method="post" name="addrole" tal:attributes="action string:${site_url}/admin_addrole">
			<div class="field-inline">
				<label for="input-role" i18n:translate="">
					Add a new role:
				</label>
				<input id="input-role" name="role" size="25" maxLength="255" />
				<input type="submit" value="Add" i18n:attributes="value" />
			</div>
		</form>
		<div class="description-text">
			<p class="cleaner" i18n:translate="">
				Do not create a role unless you really need it.
			</p>
		</div>
	</div>

	<div class="separator"></div>

	<div class="description-text">
		<p class="cleaner" i18n:translate="">
			Click edit icon (<img src="misc_/Naaya/edit" alt="edit link" tal:attributes="title string:Edit permissions" i18n:attributes="alt; title" i18n:name="edit-link"/>) to edit role`s permissions.
		</p>
	</div>

	<metal:block define-macro="datatable">
	<div class="roles-list">
		<table cellspacing="0" cellpadding="4" class="datatable">
			<thead>
				<tr>
					<th i18n:translate="">Role name</th>
					<th i18n:translate="">Edit</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				<tal:block repeat="role here/acl_users/list_all_roles">
				<tr tal:condition="python:role not in ('Manager', 'Owner')">
					<td tal:content="role" />
					<td tal:define="baseurl string:${here/absolute_url}/admin_editrole_html;
									href string:${baseurl}?role=${role}" class="td-center">
						<a tal:attributes="href href">
							<img src="misc_/Naaya/edit" alt="Edit" tal:attributes="title string:Edit '${role}' permissions" />
						</a>
					</td>
					<td tal:condition="python: role in ['Authenticated', 'Anonymous', 'Owner']">
						<a class="right info-link" href="javascript:void(0);" i18n:translate="">Details</a>
					</td>
				</tr>
				<tr tal:condition="python: role == 'Authenticated'"
					class="admin-info-text" i18n:translate="">
					<td colspan="3">
						The <a tal:attributes="href string:${here/absolute_url}/admin_editrole_html?role=Authenticated" i18n:name="Authenticated">Authenticated</a>
						role is assigned automatically to users whom have provided valid authentication credentials.
						When users are logged in they are considered to also have the Authenticated role, regardless of other roles.
					</td>
				</tr>
				<tr tal:condition="python: role == 'Anonymous'"
					class="admin-info-text" i18n:translate="">
					<td colspan="3">
						The <a tal:attributes="href string:${here/absolute_url}/admin_editrole_html?role=Anonymous" i18n:name="Anonymous">Anonymous</a>
						role is a special role assigned automatically when the user is not logged in.
						When users are logged in they are considered to also have the Anonymous role, regardless of other roles.
					</td>
				</tr>
				</tal:block>
			</tbody>
		</table>
	</div>
	</metal:block>

</tal:block>
</metal:block>
</metal:block>
</metal:block>
