archives.html 1.88 KB
Newer Older
Simon Daron's avatar
Simon Daron committed
1
2
3
4
{% extends "listen.html" %}
{% load paniktags %}
{% block title %}Listen - Archives{% endblock %}
{% block nav %}
fred's avatar
fred committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
		<nav>
		    {% if facets.fields.categories %}
		    <ul class="custom padded">
				{% for category in facets.fields.categories %} <li>
					  {% if category.0 in selected_categories %}
						<a class="check icon-check count-{{ category.1 }}" href="{{ request.get_full_path|remove_category_facet:category.0 }}">
							{{ category.0 }} | {{ category.1 }}
						</a>
					  {% else %}
						<a class="check icon-check-empty count-{{ category.1 }}" href="{{ request.get_full_path|append_category_facet:category.0 }}">{{ category.0 }} | {{ category.1 }}</a></span>
					  {% endif %}
				</li>
				{% endfor %}
		    </ul>
		    {% endif %}
		</nav>

Simon Daron's avatar
Simon Daron committed
22
{% endblock %}
fred's avatar
fred committed
23

Simon Daron's avatar
Simon Daron committed
24
{% block main %}
fred's avatar
fred committed
25
26
    <form method="get" action="." class="padded center" id="search-form">
      <div class="big">
fred's avatar
fred committed
27
28
29
            {% for category in selected_categories %}
            <input type="hidden" name="selected_facets" value="categories_exact:{{category}}"/>
            {% endfor %}
fred's avatar
fred committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
            {{ form.as_table }}<button class="icon-search"></button>
      </div>
    </form>

<div class="wrapper">

{% if not page.object_list %}
	<div class="big error padded center">Sorry, no result with your query!</div>
{% else %}

{% if page.has_previous %}
	<div class="previous-page cf">
		<a class="button big left" href="?q={{ query }}&amp;page={{ page.previous_page_number }}">&laquo; Résultats précédénts</a>
	</div>
{% endif %}

	<ul class="padded custom columns list">
		{% for result in page.object_list %}
		<li>{% soundfile_resume soundfile=result.object date=result.date %}</li>
		{% endfor %}
	</ul>

{% if page.has_next %}
	<div class="next-page cf">
		<a class="button big right" href="?q={{ query }}&amp;page={{ page.next_page_number }}">Résultats suivants &raquo;</a>
	</div>
{% endif %}

{% endif %}

</div>

Simon Daron's avatar
Simon Daron committed
62
{% endblock %}