X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/462d84ea8718cd3ca1112fe11c2120a0f20f475f..197f766eb06ca1aa6cc9ca6d8a348bb0450c26c6:/wolnelektury/templates/catalogue/book_searched.html diff --git a/wolnelektury/templates/catalogue/book_searched.html b/wolnelektury/templates/catalogue/book_searched.html index 4b92c19d2..1a345ed27 100644 --- a/wolnelektury/templates/catalogue/book_searched.html +++ b/wolnelektury/templates/catalogue/book_searched.html @@ -1,5 +1,5 @@ {% extends "catalogue/book_short.html" %} -{% load i18n %} +{% load i18n catalogue_tags %} {% block box-class %}search-result{% endblock %} @@ -8,15 +8,14 @@ <div class="snippets"> {% for hit in hits %} {% if hit.snippets %} - <p>In text:</p> - <div class="snippet-text"><a href="{% url book_text book.slug %}#f{{hit.section_number}}">{{hit.snippets.0|safe}}</a></div> + <div class="snippet-text"><a href="{% url book_text book.slug %}#sec{{hit.section_number}}">{{hit.snippets.0|safe}}</a></div> {% else %} {% if hit.fragment %} <div class="snippet-text"> - <p>{% trans "In fragment" %} - {% if hit.themes_hit %}{% trans ", for themes:" %}{% for t in hit.themes_hit %}{{t.name}} {% endfor %}{% endif %} - </p> - <a href="{{hit.fragment.get_absolute_url}}">{{hit.fragment.short_text|safe}}</a> + {% if hit.themes_hit %} + {% inline_tag_list hit.themes_hit %} + {% endif %} + <a href="{{hit.fragment.get_absolute_url}}">{{hit.fragment.text|truncatewords_html:15|safe}}</a> </div> {% endif %} {% endif %}