-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch_results.html
43 lines (35 loc) · 1.23 KB
/
search_results.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{% extends "base.html" %}
{% load i18n future mezzanine_tags %}
{% block meta_title %}{% trans "Search Results" %}{% endblock %}
{% block title %}{% trans "Search Results" %}{% endblock %}
{% block extra_head %}
<meta name="robots" content="noindex">
{% endblock %}
{% block breadcrumb_menu %}
<li>
<a href="{% url "home" %}">{% trans "Home" %}</a>
</li>
<li class="active">{% trans "Search Results" %}</li>
{% endblock %}
{% block main %}
{% if results.paginator.count == 0 %}
<p>
{% blocktrans %}
No results were found in {{ search_type }} matching your query: {{ query }}
{% endblocktrans %}
{% else %}
{% blocktrans with start=results.start_index end=results.end_index total=results.paginator.count %}
Showing {{ start }} to {{ end }} of {{ total }} results in {{ search_type }} matching your query: {{ query }}
{% endblocktrans %}
{% endif %}
</p>
<div id="search-results">
{% for result in results.object_list %}
<h5>{{ forloop.counter0|add:results.start_index }})
<a href="{{ result.get_absolute_url }}">{{ result }}</a></h5>
<p>{{ result.description|truncatewords_html:20|safe }}</p>
<a href="{{ result.get_absolute_url }}">{% trans "read more" %}</a>
{% endfor %}
</div>
{% pagination_for results %}
{% endblock %}