{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% trans "Search Terms" %}{% endblock %}

{% block extra_js %}
    {{ block.super }}
    <script>
        window.headerSearch = {
            url: "{% url 'wagtailsearchpromotions:index' %}",
            termInput: "#id_q",
            targetOutput: "#editorspicks-results"
        }
    </script>
{% endblock %}

{% block content %}
    {% trans "Promoted search results" as sp_title_str %}
    {% trans "Add new promoted result" as sp_text_str %}

    {% url "wagtailsearchpromotions:add" as add_link %}
    {% include "wagtailadmin/shared/header.html" with title=sp_title_str action_url=add_link icon="pick" action_text=sp_text_str search_url="wagtailsearchpromotions:index" %}

    <div class="nice-padding">
        <div id="editorspicks-results" class="redirects">
            {% include "wagtailsearchpromotions/results.html" %}
        </div>
    </div>
{% endblock %}
