{% extends "participant/base_participant.html" %}

{% load i18n %}
{% load staticfiles %}
{% load tags %}

{% block title %}{{ block.super }} – {% trans "Groups" %}{% endblock %}

{% block content %}
    <h1>{% trans "Groups" %}</h1>
    <table>
        <tr>
            <th>{% trans "Group" %}</th>
            <th>{% trans "Actions" %}</th>
        </tr>
    {% for group in groups %}
        <tr class="{% cycle '' 'odd' %}">
            <td><a href="{% model_url group 'view' %}">{{ group.name }}</a></td>
            <td><a href="{% url user_group_edit group.id %}"><img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit group' %}"></a>
            {% if group.name|lower != 'anonymous' and group.name|lower != 'registered' %}
            <a href="{% url user_group_delete group.id %}"><img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete group' %}"></a>
            {% endif %}
            </td>
        </tr>
    {% empty %}
        <tr>
        <td colspan="5"><i>{% trans "No groups available." %}</i></td>
        </tr>
    {% endfor %}
    </table>
{% endblock %}
