{% load i18n %}
<table class="table table-hover">
  <thead>
    <tr>
      <th>{% trans "Role" %}</th>
      {% for resource_type in box.context.resource_types %}
        <th>{{ resource_type.verbose }}</th>
      {% endfor %}
    </tr>
  </thead>
  <tbody>
    {% for role_type in box.context.role_types %}
      <tr>
        <td>{{ role_type.verbose }}</td>
        {% for resource_type in box.context.resource_types %}
          <td style="text-align: center">
            <a href="{% url "admin:cerberus:view_privileges" role_type=role_type.slug resource_type=resource_type.slug %}"><span class="icon-eye-open"></span></a>
            <a href="{% url "admin:cerberus:edit_privileges" role_type=role_type.slug resource_type=resource_type.slug %}"><span class="icon-pencil"></span></a>
          </td>
        {% endfor %}
      </tr>
    {% endfor %}
  </tbody>
</table>
