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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{% extends "base.html" %}
{% load i18n superarchives %}
{% block main-content %}
<div>
<h2>{% trans "Discussions" %}</h2>
<hr/>
<div class="row">
<div id="filters" class="hidden-xs hidden-sm col-md-2 col-lg-2">
<h3>{% trans "Filters" %}</h3>
<h4>{% trans "Sort by" %}</h4>
<ul class="unstyled-list">
{% for option, dict_order in order_data.items %}
<li>
<span class="glyphicon glyphicon-chevron-right"></span>
<a href="{% append_to_get order=option p=1 %}">
{% ifequal request.GET.order option %}
{% blocktrans with name=dict_order.name %}<strong>{{ name }}</strong>{% endblocktrans %}</a>
{% else %}
{% blocktrans with name=dict_order.name %}{{ name }}{% endblocktrans %}</a>
{% endifequal %}
</li>
{% endfor %}
</ul>
<h4>{% trans "Lists" %}</h4>
<ul class="unstyled-list">
{% for list in lists %}
{% with list.name|add:" "|add:selected_lists as list_name %}
{% if list.name in selected_lists %}
<li title="{% trans "Remove filter" %}" class="selected">
<a href="{% pop_from_get list=list.name %}">
<span class="glyphicon glyphicon-remove"></span> {{ list.name }}
</a>
</li>
{% else %}
<li>
<span class="glyphicon glyphicon-chevron-right"></span>
<a href="{% append_to_get list=list_name p=1 %}">
{{ list.name }}
</a>
</li>
{% endif %}
{% endwith %}
{% endfor %}
</ul>
</div>
<div class="col-xs-12 col-sm-12 col-md-10 col-lg-10">
<ul class="unstyled-list">
{% for thread in threads.object_list %}
{% include "message-preview.html" with doc=thread.latest_message %}
{% empty %}
<br/><br/>
<span>
<b>{% trans "No discussion found" %}</b>
</span>
{% endfor %}
</ul>
</div>
{% if n_results %}
<div class="text-center">
{% if threads.has_previous %}
<a href="{% append_to_get p=threads.previous_page_number %}">{% trans "Previous" %}</a>
{% endif %}
<span>
{% trans "Page" %} {{ threads.number }} {% trans "of" %} {{ threads.paginator.num_pages }}
</span>
{% if threads.has_next %}
<a href="{% append_to_get p=threads.next_page_number %}">{% trans "Next" %}</a>
{% endif %}
{% endif %}
</div>
</div>
{% endblock %}