{#
.. screenshot:: |canaille|/users
   :context: admin
   :align: right
   :width: 275px

The users list.

Displays a paginated list of :class:`~canaille.core.models.User`.

:param table_form: The paginated list form.
:type table_form: :class:`~canaille.app.forms.TableForm` of :class:`~canaille.core.models.User`.
#}
{% extends theme('base.html') %}
{% import "macro/table.html" as table %}

{%- block title -%}
    {%- trans %}Users{% endtrans -%}
{%- endblock -%}

{% block submenu %}
    {% if user and user.can_manage_users %}
        <a class="active item" href="{{ url_for('core.account.users') }}">
            <i class="th list icon"></i>
            {% trans %}View{% endtrans %}
        </a>
        <a class="item" href="{{ url_for('core.account.profile_creation') }}">
            <i class="plus icon"></i>
            {% trans %}Add{% endtrans %}
        </a>
        {% if features.has_smtp %}
            <a class="item" href="{{ url_for('core.account.user_invitation') }}">
                <i class="paper plane icon"></i>
                {% trans %}Invite{% endtrans %}
            </a>
        {% endif %}
    {% endif %}
{% endblock %}

{% block content %}
    <div class="ui top attached segment">
        <h2 class="ui center aligned header">
            <div class="content">
                {% trans %}Users{% endtrans %}
            </div>
        </h2>

        {{ table.search(table_form, "table.users") }}
    </div>
    {% include "core/partial/users.html" %}
{% endblock %}
