{% extends theme('base.html') %}
{% import "macro/table.html" as table %}

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

{% block script %}
    <script src="/static/js/users.js"></script>
{% endblock %}

{% block content %}
    <div class="ui segment">
        <div class="ui stackable buttons">
            <a class="ui primary button" href="{{ url_for('account.profile_creation') }}">{% trans %}Add a user{% endtrans %}</a>
            {% if has_smtp %}
                <a class="ui button" href="{{ url_for('account.user_invitation') }}">{% trans %}Invite a user{% endtrans %}</a>
            {% endif %}
        </div>
    </div>
    <div class="ui attached segment">
        <h2 class="ui center aligned header">
            <div class="content">
                {% trans %}Users{% endtrans %}
            </div>
        </h2>

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