{% extends "orga/settings/base.html" %}
{% load i18n %}

{% block settings_content %}
<div>
    <h2>
        {% trans "Teams" %}
    </h2>
    <table class="table table-sm table-hover table-responsive-md">
        <thead>
            <tr>
                <th>{% trans "Name" %}</th>
                <th>{% trans "Members" %}</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            {% for team in teams %}
            <tr>
                <td>
                    <a href="{{ request.event.orga_urls.team_settings }}/{{ team.id }}">
                        {{ team.name }}
                    </a>
                </td>
                <td>{{ team.members.count }}</td>
                <td class="text-right">
                    <a href="{{ request.event.orga_urls.team_settings }}/{{ team.id }}" class="btn btn-sm btn-info">
                        <i class="fa fa-edit"></i>
                    </a>
                    <a href="{{ request.event.orga_urls.team_settings }}/{{ team.id }}/delete" class="btn btn-sm btn-danger">
                        <i class="fa fa-trash"></i>
                    </a>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>

    <div class="submit-group"><span></span>
        <a class="btn btn-lg btn-success" href="{{ request.event.orga_urls.new_team }}">
            <i class="fa fa-plus"></i>
            {% trans "New Team" %}
        </a>
    </div>
</div>
{% endblock %}
