##// END OF EJS Templates
Implemented search over posts. Moved get_user and get_theme to utils module. Use context processors instead of creating context in the base view. Removed unused imports in some modules
Implemented search over posts. Moved get_user and get_theme to utils module. Use context processors instead of creating context in the base view. Removed unused imports in some modules

File last commit:

r690:a8dffe47 1.8-dev
r690:a8dffe47 1.8-dev
Show More
search.html
28 lines | 1020 B | text/html | HtmlLexer
{% 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 }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; {% trans 'Previous' %}{% if page.has_previous %}</a>{% endif %}
{% if page.has_next %}<a href="?q={{ query }}&amp;page= {{ page.next_page_number }}">{% endif %}{% trans 'Next' %} &raquo; {% if page.has_next %}</a>{% endif %}
</div>
{% endif %}
{% endif %}
{% endblock %}