more integrated to templates
[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 title %}{% trans "Searching in" %} WolneLektury.pl{% endblock %}
6
7 {% block bodyid %}tagged-object-list{% endblock %}
8
9 {% block body %}
10     <form action="{% url search %}" method="get" accept-charset="utf-8" id="search-form">
11         <p>{{ form.q }} <input type="submit" value="{% trans "Search" %}" /> <strong>{% trans "or" %}</strong> <a href="{% url main_page %}">{% trans "return to main page" %}</a></p>
12     </form>
13
14     <div id="results">
15       <ol>
16       {% for result in results %}
17       <li>
18         <p><a href="{{result.book.get_absolute_url}}">{{result.book.pretty_title}}</a> (id: {{result.book_id}}, score: {{result.score}})</p>
19         <ul>
20           {% for hit in result.hits %}
21           <li>
22             {% for snip in hit.3.snippets %}
23               {{snip|safe}}<br/>
24             {% endfor %}
25           </li>
26           {% endfor %}
27
28           {% for part in result.parts %}
29           {% if part.header %}
30           <li>W {{part.header}} nr {{part.position}}</li>
31           {% else %} 
32           {% if part.fragment %}
33           <li>
34             <div style="">Tagi/Motywy: {% for tag in part.fragment.tags %}{{tag.name}} {% endfor %}</div>
35             {{part.fragment.short_html|safe}}
36           </li>
37           {% endif %}
38           {% endif %}
39           {% endfor %}
40         </ul>
41       </li>
42       {% empty %}
43       <p>No results.</p>
44       {% endfor %}
45       </ol>
46     </div>
47
48
49 {% comment %}
50     <div id="books-list">
51         <p>{% trans "More than one result matching the criteria found." %}</p>
52         <ul class='matches'>
53         {% for match, link, type in results %}
54           <li>{% trans type %}: <a href='{{ link }}'>
55             {% ifequal type "book" %}
56                 {% book_title match %}
57             {% else %}
58                 {{ match.name }}
59             {% endifequal %}
60           </a></li>
61         {% endfor %}
62         </ul>
63     </div>
64 {% endcomment %}
65
66     <div id="set-window">
67         <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
68         <div class="target">
69             <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
70         </div>
71     </div>
72 {% endblock %}