{% extends "sphene/community/admin/permission/base.html" %}
{% load i18n %}
{% load sph_extras %}

{% block head %}
  {{ block.super }}
{% endblock %}

{% block content %}

<table>
  <tr>
    <th>{% trans "Options" %}</th>
    <th>{% trans "Name" %}</th>
    <th>{% trans "Flags" %}</th>
    <th>{% trans "Members" %}</th>
  </tr>
  {% for role in roles %}
    <tr>
      <td class="sph_options"><a href="{{ role.get_absolute_editurl }}">{% trans "Edit" %}</a> <a href="{{ role.get_absolute_memberlisturl }}">{% trans "Manage Members" %}</a></td>
      <td class="sph_rolename">{{ role.name }}</td>
      <td>{{ role.get_permission_flag_string }}</td>
      <td>{{ role.rolemember_set.count }}</td>
    </tr>
  {% endfor %}
</table>

<a href="{% sph_url 'admin_permission_role_create' %}">{% trans "Create Role" %}</a>

{% endblock %}
