{% load i18n %}
{% if documents %}
    {% if is_searching %}
        <h2>
        {% blocktrans count counter=documents.paginator.count %}
            There is one match
        {% plural %}
            There are {{ counter }} matches
        {% endblocktrans %}
        </h2>
    {% else %}
        <h2>{% trans "Latest documents" %}</h2>
    {% endif %}

    {% include "wagtaildocs/documents/list.html" with choosing=1 %}

    {% include "wagtailadmin/shared/pagination_nav.html" with items=documents is_ajax=1 %}
{% else %}
    <p>{% blocktrans %}Sorry, no documents match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
{% endif %}
