X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b80f646690239d9a90d708d57780f328328b26d5..d0072de89eb395f99aedcdf7804e48b547cbbeca:/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 23d1a59d4..6739645cc 100644 --- a/wolnelektury/templates/catalogue/search_multiple_hits.html +++ b/wolnelektury/templates/catalogue/search_multiple_hits.html @@ -1,72 +1,87 @@ {% extends "base.html" %} {% load i18n %} -{% load catalogue_tags pagination_tags %} +{% load catalogue_tags search_tags pagination_tags %} -{% block title %}{% trans "Searching in" %} WolneLektury.pl{% endblock %} +{% block titleextra %}{% trans "Search" %}{% endblock %} {% block bodyid %}tagged-object-list{% endblock %} {% block body %} -
-

{{ form.q }} {% trans "or" %} {% trans "return to main page" %}

-
+ {% 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 %} -
    • - {% for snip in hit.3.snippets %} - {{snip|safe}}
      - {% endfor %} -
    • - {% endfor %} - - {% for part in result.parts %} - {% if part.header %} -
    • W {{part.header}} nr {{part.position}}
    • - {% else %} - {% if part.fragment %} -
    • -
      Tagi/Motywy: {% for tag in part.fragment.tags %}{{tag.name}} {% endfor %}
      - {{part.fragment.short_html|safe}} -
    • - {% 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 %} -
    - -
    -

    * {% trans "Loading" %}

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

    {% trans "Other results" %}

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