{% extends 'layout.html' %} {% load i18n %} {% block title %}{% trans "Search Results" %}{% endblock %} {% block content %} {% with book_results|first as local_results %}

{% blocktrans %}Search Results for "{{ query }}"{% endblocktrans %}

{% trans "Matching Books" %}

{% if not local_results.results %}

{% blocktrans %}No books found for "{{ query }}"{% endblocktrans %}

{% else %}
    {% for result in local_results.results %}
  • {% include 'snippets/search_result_text.html' with result=result %}
  • {% endfor %}
{% endif %}
{% if request.user.is_authenticated %} {% if book_results|slice:":1" and local_results.results %}

{% trans "Didn't find what you were looking for?" %}

{% trans "Show results from other catalogues" as button_text %} {% include 'snippets/toggle/open_button.html' with text=button_text small=True controls_text="more-results" %}
{% endif %}
{% for result_set in book_results|slice:"1:" %} {% if result_set.results %}
{% if not result_set.connector.local %}

Results from {% if result_set.connector.name %}{{ result_set.connector.name }}{% else %}{{ result_set.connector.identifier }}{% endif %}

{% endif %}
    {% for result in result_set.results %}
  • {% include 'snippets/search_result_text.html' with result=result remote_result=True %}
  • {% endfor %}
{% endif %} {% endfor %} {% if local_results.results %} {% trans "Hide results from other catalogues" as button_text %} {% include 'snippets/toggle/close_button.html' with text=button_text small=True controls_text="more-results" %} {% endif %}
{% endif %}

{% trans "Matching Users" %}

{% if not user_results %}

{% blocktrans %}No users found for "{{ query }}"{% endblocktrans %}

{% endif %}

{% trans "Lists" %}

{% if not list_results %}

{% blocktrans %}No lists found for "{{ query }}"{% endblocktrans %}

{% endif %} {% for result in list_results %} {% endfor %}
{% endwith %} {% endblock %}