ctdo-trac/TracRendezVous/tracrendezvous/rendezvous/templates/admin_types.html

96 lines
3.5 KiB
HTML

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:py="http://genshi.edgewall.org/">
<xi:include href="admin.html" />
<head>
<title>$label_plural</title>
</head>
<body>
<h2>Manage RendezVousTypes</h2>
<py:if test="'RENDEZVOUS_ADMIN' in perm">
<form id="addperm" class="addnew" method="post" action="">
<fieldset>
<legend>Add Type:</legend>
<table>
<tr class="field">
<th><label for="gp_subject">RendezVous Type:</label></th>
<td><input id="gp_subject" type="text" name="rtype" /></td>
</tr>
</table>
<p class="help">
Create a new RendezVous Type. Note that <em>RendezVousType</em> names can't be all upper-case,
as that is reserved for permission names.
</p>
<div class="buttons">
<input type="submit" name="add" value=" Add " />
</div>
</fieldset>
</form>
<form id="addsubj" class="addnew" method="post" action="">
<fieldset>
<legend>Grant Permission To Type:</legend>
<table>
<tr class="field">
<th><label for="rtype">RendezVousType:</label></th>
<td><select id="rtype" name="rtype">
<option py:for="rtype in rendezVousTypes">${rtype.name}</option>
</select>
</td>
</tr>
<tr class="field">
<th><label for="permission">Permission:</label></th>
<td><select id="permission" name="permission">
<option py:for="action in sorted(actions)">${action}</option>
</select>
</td>
</tr>
</table>
<p class="help">
Grant permission to a RendezVousType.
</p>
<div class="buttons">
<input type="submit" name="add" value=" Add " />
</div>
</fieldset>
</form>
</py:if>
<form method="post" action="">
<table class="listing" id="permlist">
<thead>
<tr><th>RendezVous Type</th><th>Default</th><th>Permission</th><th>delete</th></tr>
</thead>
<tbody>
<tr py:for="idx, rtype in enumerate(rendezVousTypes)"
class="${idx % 2 and 'odd' or 'even'}">
<td>${rtype.name}</td>
<td><input type="radio" name="default" value="${rtype.type_id}" checked="${rtype.type_id == default_rendezvous_type and 'checked' or None}" /></td>
<td>
<py:for each="typePerm in rtype.typePermissions">
<div>
<input type="checkbox" id="${typePerm.type_id}:${typePerm.permission}" name="sel" value="${typePerm.type_id}:${typePerm.permission}" />
<label for="${typePerm.type_id}:${typePerm.permission}">${typePerm.permission}</label>
</div>
</py:for>
</td>
<td><input type="checkbox" id="delete:${rtype.type_id}" name="rsel" value="${rtype.type_id}"/></td>
</tr>
</tbody>
</table>
<div class="buttons">
<input type="submit" name="save" value="Save Changes" />
</div>
</form>
<p class="help">
Note that <em>RendezVousType</em> names can't be all upper-case,
as that is reserved for permission names.
</p>
</body>
</html>