{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Users" %}{% endblock %}
{% block extra_js %}
    {{ block.super }}
    <script>
        window.headerSearch = {
            {% if group %}
            url: "{% url 'wagtailusers_groups:users' group.id %}",
            {% else %}
            url: "{% url 'wagtailusers_users:index' %}",
            {% endif %}
            termInput: "#id_q",
            targetOutput: "#user-results"
        }
    </script>
{% endblock %}

{% block content %}
    {% trans "Users" as users_str %}
    {% trans "Add a user" as add_a_user_str %}

    {% url "wagtailusers_users:add" as add_link %}
    {% include "wagtailadmin/shared/header.html" with subtitle=group.name title=users_str action_url=add_link action_text=add_a_user_str icon="user" search_url="wagtailusers_users:index" %}

    <div class="nice-padding">
        <div id="user-results" class="users">
            {% include "wagtailusers/users/results.html" %}
        </div>
    </div>
{% endblock %}
