search.html
28 lines
| 1020 B
| text/html
|
HtmlLexer
neko259
|
r690 | {% extends 'boards/base.html' %} | |
{% load board %} | |||
{% load i18n %} | |||
{% block content %} | |||
<div class="post-form-w"> | |||
<h3>{% trans 'Search' %}</h3> | |||
<form method="get" action="."> | |||
{{ form.as_p }} | |||
<input type="submit" value="{% trans 'Search' %}"> | |||
</form> | |||
</div> | |||
{% if query %} | |||
{% for result in page.object_list %} | |||
{% post_view result.object %} | |||
{% empty %} | |||
<p>{% trans 'No results found.' %}</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 %}« {% trans 'Previous' %}{% if page.has_previous %}</a>{% endif %} | |||
{% if page.has_next %}<a href="?q={{ query }}&page= {{ page.next_page_number }}">{% endif %}{% trans 'Next' %} » {% if page.has_next %}</a>{% endif %} | |||
</div> | |||
{% endif %} | |||
{% endif %} | |||
{% endblock %} |