small fixes
[wolnelektury.git] / apps / catalogue / templates / catalogue / book_searched.html
index a965bfc..4ac66fb 100644 (file)
     {% 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>
+    <a href="{{hit.fragment.get_absolute_url}}">
+      {% if hit.snippet %}
+        {{hit.snippet|safe}}
+      {% else %}
+        {{hit.fragment.text|truncatewords_html:15|safe}}
+      {% endif %}
+    </a>
   </div>
   {% endif %}
   {% endif %}