{% load i18n wagtailadmin_tags %}
{% if users %}
    {% if is_searching %}
        <h2>
        {% blocktrans count counter=users|length %}
            There is {{ counter }} match
        {% plural %}
            There are {{ counter }} matches
        {% endblocktrans %}
        </h2>
        
        {% search_other %}
    {% endif %}

    {% include "wagtailusers/users/list.html" %}

    {% include "wagtailadmin/shared/pagination_nav.html" with items=users is_searching=is_searching linkurl="wagtailusers_users:index" %}
{% else %}
    {% if is_searching %}
         <h2>{% blocktrans %}Sorry, no users match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>
         
         {% search_other %}
    {% else %}
        {% url 'wagtailusers_create' as wagtailusers_create_url %}
        <p>{% blocktrans %}There are no users configured. Why not <a href="{{ wagtailusers_create_url }}">add some</a>?{% endblocktrans %}</p>
    {% endif %}
{% endif %}
