manage_groups.html
1.02 KB
{% extends "base.html" %}
{% load ingroup version_static i18n %}
{% block extrahead %}
<script type="text/javascript"
src="{% version_static 'js/manage-groups.js' %}"></script>
{% endblock %}
{% block title %}{% trans 'User roles' %}{% endblock %}
{% block text-content %}
<h3>{% trans 'User roles' %}</h3>
<table id="user-groups">
<tr>
<th>{% trans 'name' %}</th>
{% for group in groups %}
<th>{{ group.name }}</th>
{% endfor %}
</tr>
{% for u in users %}
<tr>
<td>{{ u.username }}</td>
{% for group in groups %}
<td>
<input
type="checkbox"
id="group-{{ group.pk }}-{{ u.pk }}"
{% if u|ingroup:group %}checked="checked"{% endif %}/>
</td>
{% endfor %}
</tr>
{% endfor %}
</table>
{% endblock %}