{% extends "admin/change_form.html" %}
{% load i18n adminmedia %}

{% block object-tools %}
{% endblock %}

{% block after_field_sets %}

<div id="changeform" class="module">
<table cellspacing="0">
<thead>
<tr>
<th>Permissions</th>
{% for role in roles %}
<th>{{ role }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for perm, roles in role_permissions.items %}
<tr class="{% cycle 'row1' 'row2' %}">
<td>{{ perm }}</td>
{% for role, checked in roles %}
<td><input type="checkbox" {% if checked %}checked="checked"{% endif %} class="action-select" value="{{ role.id}}_{{ perm.id }}" name="selected_perm" /></td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>

</div>

{% endblock %}


