small fixes
[wolnelektury.git] / apps / search / templates / newsearch / search.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags %}
4
5 {% block title %}Search{% endblock %}
6
7 {% block metadescription %}{% endblock %}
8
9 {% block bodyid %}newsearch{% endblock %}
10
11 {% block body %}
12     <h1>Search</h1>
13     <form action="{% url search %}" method="get" accept-charset="utf-8" id="search-form-x">
14         <p>
15           <input type="text" name="q" value="{{request.GET.q}}" style="width:250px; font-size: 1.2em;">
16           <input type="submit" value="{% trans "Search" %}" /> 
17           <br />
18           <input type="checkbox" value="true" name="fuzzy" {% if fuzzy %}checked{% endif %}/> fuzzy.
19         </p>
20     </form>
21     {% if did_you_mean %}
22     Czy miałeś na mysli <a href="?q={{did_you_mean|urlencode}}">{{did_you_mean}}</a>?
23     {% endif %}
24
25
26     <div id="results">
27       <ol>
28       {% for result in results %}
29       <li>
30         <p><a href="{{result.book.get_absolute_url}}">{{result.book.pretty_title}}</a> (id: {{result.book_id}}, score: {{result.score}})</p>
31         <ul>
32           {% for snip in hit.snippets %}
33           <li>
34             {{snip|safe}}<br/>
35           </li>
36           {% endfor %}
37
38           {% for part in result.parts %}
39           {% if part.header %}
40           <li>W {{part.header}} nr {{part.position}}</li>
41           {% else %} 
42           {% if part.fragment %}
43           <li>
44             <div style="">Tagi/Motywy: {% for tag in part.fragment.tags %}{{tag.name}} {% endfor %}</div>
45             {{part.fragment.short_html|safe}}
46           </li>
47           {% endif %}
48           {% endif %}
49           {% endfor %}
50         </ul>
51       </li>
52       {% empty %}
53       <p>No results.</p>
54       {% endfor %}
55       </ol>
56     </div>
57
58 {% endblock %}