{% extends "catalogue/book_short.html" %}
-{% load i18n %}
+{% load i18n catalogue_tags %}
{% block box-class %}search-result{% endblock %}
<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 %}#sect{{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.get_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 %}