Using cache middleware instead of various caching micro-strategies,
[wolnelektury.git] / apps / catalogue / templates / catalogue / book_searched.html
index a965bfc..357491c 100644 (file)
@@ -1,26 +1,38 @@
-{% extends "catalogue/book_short.html" %}
-{% load i18n catalogue_tags %}
+{% spaceless %}
 
+{% load i18n %}
+{% load inline_tag_list from catalogue_tags %}
+{% load ssi_include from ssify %}
 
-{% block box-class %}search-result{% endblock %}
+<div class="search-result">
+
+{% ssi_include 'catalogue_book_short' pk=book.pk %}
 
-{% block right-column %}
 <div class="snippets">
   {% for hit in hits %}
   {% if hit.snippet %}
-  <div class="snippet-text"><a href="{% url book_text book.slug %}#sec{{hit.section_number}}">{{hit.snippet|safe}}</a></div>
+  <div class="snippet-text"><a href="{% url 'book_text' book.slug %}#sec{{hit.section_number}}">{{hit.snippet|safe}}</a></div>
   {% else %}
   {% if hit.fragment %}
   <div class="snippet-text">
     {% 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 %}
   {% endfor %}
 </div>
 
-{% endblock %}
+<div style="clear: right"></div>
+
+</div>
 
+{% endspaceless %}
\ No newline at end of file