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

    {% include "wagtailsearchpromotions/list.html" %}

    {% include "wagtailadmin/shared/pagination_nav.html" with items=queries is_searching=is_searching linkurl="wagtailsearchpromotions:index" %}
{% else %}
    {% if is_searching %}
         <p>{% blocktrans %}Sorry, no promoted results match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
    {% else %}
        {% url 'wagtailsearchpromotions:add' as wagtailsearchpromotions_add_url %}
        <p>{% blocktrans %}No promoted results have been created. Why not <a href="{{ wagtailsearchpromotions_add_url }}">add one</a>?{% endblocktrans %}</p>
    {% endif %}
{% endif %}
