loops/security/browser/audit.pt
helmutm b52c68edcb enable translation for role names
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@4138 fd906abe-77d9-0310-91a1-e0d9ade77398
2011-01-09 09:44:22 +00:00

103 lines
3.7 KiB
XML

<html i18n:domain="loops">
<!-- $Id$ -->
<metal:macro define-macro="role_permissions">
<metal:headline use-macro="view/concept_macros/concepttitle" /><br />
<div>
<form>
<b>Type:</b>
<span tal:condition="python:len(item.types) <= 1">
<span tal:content="item/selectedType/label" />&nbsp;&nbsp;&nbsp;</span>
<span tal:condition="python:len(item.types) > 1">
<select name="selected_type"
onchange="submit()">
<option tal:repeat="type item/types"
tal:content="type/label"
tal:attributes="value type/token;
selected python:
type['token'] == item.selectedType['token']">View</option>
</select>&nbsp;&nbsp;&nbsp;</span>
<b>Permission:</b>
<span tal:condition="python:len(item.permissions) <= 1"
tal:content="item/selectedPermission" />
<select name="selected_permission"
tal:condition="python:len(item.permissions) > 1"
onchange="submit()">
<option tal:repeat="perm item/permissions"
tal:content="perm"
tal:attributes="value perm;
selected python:
perm == item.selectedPermission">View</option>
</select>
</form>
</div>
<table class="listing">
<tr>
<th>Object</th>
<th class="center"
i18n:translate=""
tal:repeat="role item/roles"
tal:content="role" />
</tr>
<tr tal:repeat="obj item/objects"
tal:attributes="class python: repeat['obj'].odd() and 'even' or 'odd';">
<td>
<a tal:attributes="href python:view.getUrlForTarget(obj['object'])"
tal:content="obj/title" /></td>
<td class="center"
tal:repeat="setting obj/settings"
tal:content="setting" />
</tr>
</table>
</metal:macro>
<metal:macro define-macro="workspace_assignments">
<metal:headline use-macro="view/concept_macros/concepttitle" /><br />
<table class="listing">
<tr>
<th></th>
<th class="center"
tal:repeat="pred item/workspacePredicates"
tal:content="pred/title" />
</tr>
<tr tal:repeat="ws item/workspaces"
tal:attributes="class python: repeat['ws'].odd() and 'even' or 'odd';">
<td>
<a tal:attributes="href python:view.getUrlForTarget(ws)"
tal:content="ws/title" /></td>
<td class="center"
tal:repeat="rels python:item.getAssignments(ws)">
<div tal:repeat="rel rels">
<a tal:attributes="href python:view.getUrlForTarget(rel.second)"
tal:content="rel/second/title" /></div></td>
</tr>
</table>
</metal:macro>
<metal:macro define-macro="person_workspace_assignments">
<metal:headline use-macro="view/concept_macros/concepttitle" /><br />
<table class="listing">
<tr>
<th>Person</th>
<th class="center"
tal:repeat="ws item/workspaces">
<a tal:attributes="href python:view.getUrlForTarget(ws)"
tal:content="ws/title" /></th>
</tr>
<tr tal:repeat="person item/persons"
tal:attributes="class python: repeat['person'].odd() and 'even' or 'odd';">
<td>
<a tal:attributes="href python:view.getUrlForTarget(person)"
tal:content="person/title" /></td>
<td class="center"
tal:repeat="assignment python:item.getAssignments(person)"
tal:content="assignment" />
</tr>
</table>
</metal:macro>
</html>