search ui draft
[wolnelektury.git] / wolnelektury / templates / catalogue / search_multiple_hits.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags pagination_tags %}
4
5 {% block titleextra %}{% trans "Search" %}{% endblock %}
6
7 {% block bodyid %}tagged-object-list{% endblock %}
8
9 {% block body %}
10     <h1>{% trans "Search" %}</h1>
11
12     <div id="results">
13       <ol>
14       {% for result in results %}
15       <li>
16         <p><a href="{{result.book.get_absolute_url}}">{{result.book.pretty_title}}</a> (id: {{result.book_id}}, score: {{result.score}})</p>
17         <ul>
18           {% for hit in result.process_hits %}
19           <li>
20             {% if hit.fragment %}
21             <a href="{{hit.fragment.get_absolute_url}}">Idź do fragmentu</a>
22             <div style="">Tagi/Motywy: {% for tag in hit.themes %}{{tag.name}} {% endfor %}</div>
23             {% endif %}
24             {% for snip in hit.snippets %}
25               {{snip|safe}}<br/>
26             {% endfor %}
27           </li>
28           {% endfor %}
29
30         </ul>
31       </li>
32       {% empty %}
33       <p>No results.</p>
34       {% endfor %}
35       </ol>
36     </div>
37
38
39 {% comment %}
40     <div id="books-list">
41         <p>{% trans "More than one result matching the criteria found." %}</p>
42         <ul class='matches'>
43         {% for match, link, type in results %}
44           <li>{% trans type %}: <a href='{{ link }}'>
45             {% ifequal type "book" %}
46                 {% book_title match %}
47             {% else %}
48                 {{ match.name }}
49             {% endifequal %}
50           </a></li>
51         {% endfor %}
52         </ul>
53     </div>
54 {% endcomment %}
55
56 {% endblock %}