X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/73ce961f14509aabfa26536f847afd28111029c6..69191eddb9e4221d964a7e5b044ff7c5dfe38315:/wolnelektury/templates/catalogue/search_multiple_hits.html diff --git a/wolnelektury/templates/catalogue/search_multiple_hits.html b/wolnelektury/templates/catalogue/search_multiple_hits.html index 7a3e580b8..6739645cc 100644 --- a/wolnelektury/templates/catalogue/search_multiple_hits.html +++ b/wolnelektury/templates/catalogue/search_multiple_hits.html @@ -1,75 +1,87 @@ {% extends "base.html" %} {% load i18n %} -{% load catalogue_tags pagination_tags %} +{% load catalogue_tags search_tags pagination_tags %} {% block titleextra %}{% trans "Search" %}{% endblock %} {% block bodyid %}tagged-object-list{% endblock %} {% block body %} -

{% trans "Search" %}

- {% if did_you_mean %} {% trans "Dod you mean" %} {{did_you_mean|lower}}? {% endif %} -
-
    - {% for result in results %} -
  1. -

    {{result.book.pretty_title}} (id: {{result.book_id}}, score: {{result.score}})

    -
      - {% for hit in result.hits %} -
    • - {% if hit.fragment %} - Idź do fragmentu -
      Tagi/Motywy: {% for tag in hit.themes %}{{tag.name}} {% endfor %}
      - {# snippets or short html? #} - {% if hit.snippets %} - {% for snip in hit.snippets %} - {{snip|safe}}
      - {% endfor %} - {% else %} - {{hit.fragment.short_text|safe}} - {% endif %} - - {% else %} - {# it's a section #} - {{hit.header_index}} - {% if hit.snippets %} - {% for snip in hit.snippets %} - {{snip|safe}}
      - {% endfor %} - {% else %} - [section matched but no snippets :-(] - {% endif %} - {% endif %} -
    • - {% endfor %} + -
    -
  2. - {% empty %} -

    No results.

    - {% endfor %} + {% spaceless %} + {% if results.author %} +
    +
    +

    {% trans "Results by authors" %}

    +
    +
    +
    +
      + {% for author in results.author %} +
    1. + {% book_short author.book %} +
    2. + {% endfor %}
    + {% endif %} + {% if results.title %} +
    +
    +

    {% trans "Results by title" %}

    +
    +
    +
    +
      + {% for result in results.title %} +
    1. + {% book_short result.book %} +
    2. + {% endfor %} +
    +
    + {% endif %} -{% comment %} -
    -

    {% trans "More than one result matching the criteria found." %}

    - + {% if results.content %} +
    +
    +

    {% trans "Results in text" %}

    +
    +
    +
    +
      + {% for result in results.content %} +
    1. + {% book_searched result %} +
    2. + {% endfor %} +
    -{% endcomment %} + {% endif %} + + {% if results.other %} +
    +
    +

    {% trans "Other results" %}

    +
    +
    +
    +
      + {% for result in results.other %} +
    1. + {% book_searched result %} +
    2. + {% endfor %} +
    +
    + {% endif %} + {% endspaceless %} + + {% endblock %}