{% load i18n %}
<div class="group">
<form method="POST" action="">{% csrf_token %}
    <table>
        <tr>
            <th>{% trans "ID" %}</th>
            <th>{% trans "Username" %}</th>
            <th>{% trans "First Name" %}</th>
            <th>{% trans "Last Name" %}</th>
            <th>{% trans "Email" %}</th>
        </tr>
        {% for user in users %}
        <tr>
            <td>{{ user.id }}</td>
            <td><a href="{% if user.username %}{% url profile user.username %}{% else %}{% url profile.edit user.id  %}{% endif %}">{{ user.username }}</a></td>
            <td>{{ user.first_name }}</td>
            <td>{{ user.last_name }}</td>
            <td>{{ user.email }}</td>
        </tr>
        <input name="id_users" type="hidden" value="{{ user.id }}">
        {% endfor %}
    </table>
    {% if request.user.is_superuser %}
    <input class="merge_button" type="submit" value="Merge these users" />
    {% endif %}
</form>
</div>
