1 {% extends "base.html" %}
 
   3 {% load catalogue_tags pagination_tags %}
 
   5 {% block titleextra %}{% trans "Search" %}{% endblock %}
 
   7 {% block bodyid %}tagged-object-list{% endblock %}
 
  10     <h1>{% trans "Search" %}</h1>
 
  13       <span class="did_you_mean">{% trans "Dod you mean" %} <a href="{% url search %}?q={{did_you_mean|urlencode}}">{{did_you_mean|lower}}</a></b>?</span>
 
  17       {% for result in results %}
 
  19         <p><a href="{{result.book.get_absolute_url}}">{{result.book.pretty_title}}</a> (id: {{result.book_id}}, score: {{result.score}})</p>
 
  21           {% for hit in result.hits %}
 
  24             <a href="{{hit.fragment.get_absolute_url}}">Idź do fragmentu</a>
 
  25             <div style="">Tagi/Motywy: {% for tag in hit.themes %}{{tag.name}} {% endfor %}</div>
 
  26             {# snippets or short html? #}
 
  28              {% for snip in hit.snippets %}
 
  32              {{hit.fragment.short_text|safe}}
 
  37             <a href="{% url book_text result.book.slug %}#f{{hit.section_number}}">{{hit.header_index}}</a>
 
  39               {% for snip in hit.snippets %}
 
  43                [section matched but no snippets :-(]
 
  60         <p>{% trans "More than one result matching the criteria found." %}</p>
 
  62         {% for match, link, type in results %}
 
  63           <li>{% trans type %}: <a href='{{ link }}'>
 
  64             {% ifequal type "book" %}
 
  65                 {% book_title match %}