book search - new design - almost ready
[wolnelektury.git] / wolnelektury / templates / catalogue / book_searched.html
1 {% extends "catalogue/book_wide.html" %}
2 {% load i18n %}
3
4
5 {% block box-class %}book-wide-box search-result{% endblock %}
6
7 {% block quote %}
8 {% if hits.0.snippets %}
9   <div class="cite-text"><a href="{% url book_text book.slug %}#f{{hits.0.section_number}}">{{hits.0.snippets.0|safe}}</a></div>
10 {% else %}{% if hits.0.fragment %}
11   <div class="cite-text"><a href="{{hits.0.fragment.get_absolute_url}}">{{hits.0.fragment.short_text|safe}}</a></div>
12 {% endif %}{% endif %}
13
14 {% if hits.1 %}
15   <p class="cite-more mono"><a class="see-more-snippets" href="#snippets-{{book.id}}">{% trans "See more" %}</a></p>
16 {% endif %}
17 {% endblock %}
18
19
20 {% block box-append %}
21 <div class="snippets ui-helper-hidden">
22 <a name="snippets-{{book.id}}">
23 {% for hit in hits %}
24   {% if hit.snippets %}
25     <div class="snippet-text"><a href="{% url book_text book.slug %}#f{{hit.section_number}}">{{hit.snippets.0|safe}}</a></div>
26   {% else %}
27     {% if hit.fragment %}
28       <div class="snippet-text"><a href="{{hit.fragment.get_absolute_url}}">{{hit.fragment.short_text|safe}}</a></div>
29     {% endif %}
30   {% endif %}
31 {% endfor %}
32 </a>
33 </div>
34 {% endblock %}