{% extends "base.html" %}
{% load i18n %}
{% load translations %}
{% load crispy_forms_tags %}

{% block breadcrumbs %}
  {% if path_object %}
    {% path_object_breadcrumbs path_object %}
    <li><a href="{{ back_url }}#search">{% trans "Search" %}</a></li>
  {% else %}
    <li><a href="{% url 'search' %}">{% trans "Search" %}</a></li>
  {% endif %}
{% endblock %}

{% block content %}

{% if show_results %}
    <form method="GET" class="result-page-form">
        {% crispy search_form  %}
    </form>
    {% if page_obj.object_list %}
        {% include "snippets/embed-units.html" with units=page_obj.object_list hide_context=True include_search=True force_source=True show_translation=True %}
        {% include "paginator.html" %}
    {% else %}
        {% trans "No matching strings found." as msg %}
        {% show_message "info" msg %}
    {% endif %}

{% else %}
    <form method="GET" class="result-page-form">
    {% include "snippets/search-form.html" %}
    </form>
{% endif %}

{% endblock %}
