{% extends "shatailadmin/base.html" %} {% load i18n %} {% load static shatailadmin_tags %} {% block titletag %}{% trans "Redirects" %}{% endblock %} {% block extra_js %} {{ block.super }}
<script>
    window.headerSearch = {
        url: "{% url 'shatailredirects:index' %}",
        termInput: "#id_q",
        targetOutput: "#redirects-results"
    }
</script>
{% endblock %} {% block content %}
<link rel="stylesheet" type="text/css" href="{% static 'shatailredirects/css/index.css' %}"> {% trans "Redirects" as redirects_str %} {% if user_can_add %} {% url "shatailredirects:add" as add_link %} {% trans "Add redirect" as add_str %} {% url "shatailredirects:start_import" as import_link %} {% url "shatailredirects:report" as report_link
%} {% trans "Import redirects" as import_str %} {% trans "Export redirects" as export_str %}

<header class="hasform">
    {% block breadcrumb %}{% endblock %}
    <div class="row nice-padding">
        <div class="left">
            <div class="col header-title">
                <h1 class="icon icon-redirect">{{ redirects_str }}</h1>
            </div>
            <form class="col search-form" action="{% url " shatailredirects:index " %}{% if query_parameters %}?{{ query_parameters }}{% endif %}" method="get" novalidate role="search">
                <ul class="fields">
                    {% for field in search_form %} {% include "shatailadmin/shared/field_as_li.html" with field=field field_classes="field-small iconfield" icon="search" %} {% endfor %}
                    <li class="submit visuallyhidden"><input type="submit" value="Search" class="button" /></li>
                </ul>
            </form>
        </div>
        <div class="right has-multiple-actions">
            <div class="actionbutton">
                <a href="{{ add_link }}" class="button bicolor button--icon">{% icon name="plus" wrapped=1 %}{{ add_str }}</a>
            </div>

            <div class="dropdown dropdown-button match-width">
                <a href="{{ import_link }}" class="button bicolor button--icon">{% icon name="doc-full-inverse" wrapped=1 %}{{ import_str }}</a>
                <div class="dropdown-toggle">{% icon name="arrow-down" %}</div>
                <ul>
                    <li><a class="button bicolor button--icon" href="{{ report_link }}">{% icon name="download" wrapped=1 %}{{ export_str }}</a></li>
                </ul>
            </div>
        </div>
    </div>
</header>
{% else %} {% include "shatailadmin/shared/header.html" with title=redirects_str icon="redirect" search_url="shatailredirects:index" %} {% endif %}

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

{% endblock %}