archives.html 3.13 KB
Newer Older
Simon Daron's avatar
Simon Daron committed
1
2
{% extends "listen.html" %}
{% load paniktags %}
fred's avatar
fred committed
3
{% block title %}Sons - Archives{% endblock %}
Simon Daron's avatar
Simon Daron committed
4
{% block nav %}
5
6
7
8
9
10
11
12
13

<p class="intro">
Ut numquam adipiscing sea, pro ne definiebas mediocritatem. Sed ut justo
semper, eam ea admodum albucius suscipiantur, eu eam omnesque suavitate. Nec te
iriure iudicabit. Ut nec deleniti tractatos. Ea postea suavitate voluptaria
pri, ei viris quaestio concludaturque qui, cu copiosae senserit quo. Cu dictas
officiis has, hinc libris aliquam pro te.
</p>

fred's avatar
fred committed
14
	<div class="search-filters">
fred's avatar
fred committed
15
		{% if facets.fields.categories %}
fred's avatar
fred committed
16
17
		<nav>
		    <ul class="custom padded">
18
				<li><span class="mainLabel">Genre :</span></li>
fred's avatar
fred committed
19
20
				{% for category in facets.fields.categories %} <li>
					  {% if category.0 in selected_categories %}
fred's avatar
fred committed
21
						<a class="check icon-check" href="{{ request.get_full_path|remove_category_facet:category.0 }}">
fred's avatar
fred committed
22
23
24
							{{ category.0 }} | {{ category.1 }}
						</a>
					  {% else %}
fred's avatar
fred committed
25
						<a class="check icon-check-empty" href="{{ request.get_full_path|append_category_facet:category.0 }}">{{ category.0 }} | {{ category.1 }}</a></span>
fred's avatar
fred committed
26
27
28
29
30
					  {% endif %}
				</li>
				{% endfor %}
		    </ul>
		</nav>
fred's avatar
fred committed
31
32
33
34
35
		{% endif %}

		{% if facets.fields.tags %}
		<nav>
		    <ul class="tag-facets custom padded">
fred's avatar
fred committed
36
			<li><span class="mainLabel">Mots-clés :</span></li>
fred's avatar
fred committed
37
38
39
			{% for tag in facets.fields.tags|slice:":20" %} {# Provide only the top 20 tags #}
			<li>
			  {% if tag.0 in selected_tags %}
fred's avatar
fred committed
40
				<a class="check icon-check" href="{{ request.get_full_path|remove_tag_facet:tag.0 }}">
fred's avatar
fred committed
41
42
43
					{{ tag.0 }} <span class="smooth">| {{ tag.1 }}</span>
				</a>
			  {% else %}
fred's avatar
fred committed
44
				<a class="check icon-check-empty" href="{{ request.get_full_path|append_tag_facet:tag.0 }}">{{ tag.0 }} <span class="smooth">| {{ tag.1 }}</span></a> 
fred's avatar
fred committed
45
46
47
48
49
50
			  {% endif %}
			</li>
			{% endfor %}
		    </ul>
		</nav>
		{% endif %}
fred's avatar
fred committed
51
	</div> <!-- .search-filters -->
fred's avatar
fred committed
52

Simon Daron's avatar
Simon Daron committed
53
{% endblock %}
fred's avatar
fred committed
54

Simon Daron's avatar
Simon Daron committed
55
{% block main %}
fred's avatar
fred committed
56
57
    <form method="get" action="." class="padded center" id="search-form">
      <div class="big">
fred's avatar
fred committed
58
59
60
            {% for category in selected_categories %}
            <input type="hidden" name="selected_facets" value="categories_exact:{{category}}"/>
            {% endfor %}
fred's avatar
fred committed
61
62
63
            {% for tag in selected_tags %}
            <input type="hidden" name="selected_facets" value="tags_exact:{{tag}}"/>
            {% endfor %}
fred's avatar
fred committed
64
65
66
67
68
69
70
            {{ form.as_table }}<button class="icon-search"></button>
      </div>
    </form>

<div class="wrapper">

{% if not page.object_list %}
fred's avatar
fred committed
71
	<div class="big error padded center">Manque de pot, pas de résultats à cette recherche !</div>
fred's avatar
fred committed
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{% 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
96
{% endblock %}