{% extends "voters/base.html" %} {% load i18n static search %} {% block bodyextraclass %}search {{ block.super }}{% endblock bodyextraclass %} {% block container %}

{% trans 'Search Results' %} |

{% with results|length as result_count %} {% trans 'the search' %} {% if terms %}{% trans 'for' %} “{{ query | upper }}”{% endif %} returned {{ result_count }} {% trans 'result' %}{{ result_count|pluralize }} {% endwith %}
{% if results %}
{% for r in results %}
{% searchexcerpt terms 15 as content %} {# set `content` object #} {{ r.content|safe }} {% endsearchexcerpt %} {% highlight terms as title %} {# set `title` object #} {{ r.title }} {% endhighlight %}

{{ title.highlighted }} {% if terms %}{% with content.hits|add:title.hits as hits %} {% endwith %}{% endif %}

{{ content.excerpt|highlight:terms }}

{% endfor %}
{% endif %}
{% endblock container %}