Add list of assigned users to role view page.

This surely could be better still; at least this is *something*.
This commit is contained in:
Lance Edgar 2015-07-16 17:11:25 -05:00
parent bafa1a0fd7
commit e0cb47d03a
2 changed files with 44 additions and 1 deletions

View file

@ -0,0 +1,37 @@
## -*- coding: utf-8 -*-
<%inherit file="/roles/crud.mako" />
${parent.body()}
<h2>Users</h2>
% if role is guest_role:
<p>The guest role is implied for all users.</p>
% elif role.users:
<p>The following users are assigned to this role:</p>
<br />
<div class="grid clickable">
<table>
<thead>
<th>Username</th>
<th>Full Name</th>
</thead>
<tbody>
% for i, user in enumerate(role.users, 1):
<tr class="${'odd' if i % 2 else 'even'}" url="${url('user.read', uuid=user.uuid)}">
<td>${user.username}
<td>${user.display_name}</td>
</tr>
% endfor
</tbody>
</table>
</div>
% else:
<p>There are no users assigned to this role.</p>
% endif