X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9fbf0c4158a9427442171629a564e2de7780b5b7..73ce961f14509aabfa26536f847afd28111029c6:/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 414dcfdc0..7a3e580b8 100644 --- a/wolnelektury/templates/catalogue/search_multiple_hits.html +++ b/wolnelektury/templates/catalogue/search_multiple_hits.html @@ -9,21 +9,40 @@ {% 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.process_hits %} + {% 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 %} - {% for snip in hit.snippets %} - {{snip|safe}}
      - {% endfor %}
    • {% endfor %}