+{% extends 'pybb/base.html' %}
+{% load i18n %}
+
+
+{% block content %}
+
+ <h1>{% trans 'Search' %}</h1>
+ <form method="get">
+ {{form.q}}
+ <tr>
+ <td> </td>
+ <td>
+ <input type="submit" value="{% trans 'Search' %}">
+ </td>
+ </tr>
+ </form>
+
+ {% if query %}
+ <hr/>
+ {% for result in page.object_list %}
+ <p class="search-result">
+ <strong>Temat:</strong> <a href="{{ result.object.get_absolute_url }}">{{ result.object.topic.name }}</a><br/>
+ {% autoescape off %}
+ {% for snippet in result.highlighted.text %}
+ {{snippet}}{% if not forloop.last %} <strong>...</strong> {% endif %}
+ {% endfor %}
+ {% endautoescape %}
+ </p>
+ {% empty %}
+ <p>Brak wyników.</p>
+ {% endfor %}
+
+ {% if page.has_previous or page.has_next %}
+ <div>
+ {% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Poprzednie{% if page.has_previous %}</a>{% endif %}
+ |
+ {% if page.has_next %}<a href="?q={{ query }}&page={{ page.next_page_number }}">{% endif %}Następne »{% if page.has_next %}</a>{% endif %}
+ </div>
+ {% endif %}
+ {% endif %}
+{% endblock %}
\ No newline at end of file