summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates/search.html
blob: 303b9a5f53ec9de5ba11bd119041c3876e758dfe (plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{% extends "base.html" %}
{% load hk_generic %}
{% load gravatar %}

{% block content %}

{% if threads.object_list %}
<div class="pagination">
	<span class="step-links"> {% if threads.has_previous %} <a href="{{full_path|strip_page}}/{{ threads.previous_page_number }}">previous</a> {% endif %} <span class="current"> Page {{ threads.number }} of {{ threads.paginator.num_pages }}. </span> {% if threads.has_next %} <a href="{{full_path|strip_page}}/{{ threads.next_page_number }}">next</a> {% endif %} </span>
</div>
{% endif %}

{% for email in threads.object_list %}
<!-- New thread -->
<div class="thread">
	<div class="notsaved">
		<a href="{% url thread threadid=email.thread_id, mlist_fqdn=list_address %}"> <span class="thread_title">{{email.subject}}</span> </a>
		<span class="thread_date">{{email.date}}</span>
	</div>
	<div class="thread_content">
		{% if email.category_tag %}
		<div class="inline-block type type_{{email.category_tag}}">
			<a href="{% url search_tag mlist_fqdn=list_address, tag=email.category_tag %}">{{email.category}}</a>
		</div>
		{% endif %}
        {% if email.category %}
		<div class="inline-block type type_{{email.category|lower}}">
			<a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}">{{email.category}}</a>
		</div>
		{% endif %}
		<div class="inline-block gravatar">
			{% if email.sender_email %}
			{% gravatar_img_for_email email.sender_email 40 %}
			<br />
			{% endif %}
			{{email.sender_name}}
		</div>
		<div class="inline-block thread_email">
			<span class="expander"> {{email.content}} </span>
		</div>
	</div>
	<div class="thread_info">
		<ul class="tags inline">
			<li>
				Tags:
			</li>
			{% for tag in email.tags %}
			<li>
				<a href="{% url search_tag mlist_fqdn=list_address, tag=tag %}">{{tag}}</a>
			</li>
			{% endfor %}
		</ul>
		<ul class="inline-block">
			<li class="participant">
				{{email.participants|length}} participants
			</li>
			<li class="discussion">
				{{email.answers}} comments
			</li>
		</ul>
		<ul class="inline-block">
			<li class="likestatus {{email.likestatus}}">
				+{{email.liked}}
			</li>
			<li class="voteup">
				<a class="youlike" href="#like">Like</a>
			</li>
			<li class="votedown">
				<a class="youdislike" href="#dislike">Dislike</a>
			</li>
		</ul>
	</div>
</div>
<!-- End of thread -->
{% empty %}
Sorry no emails could be found for your search.
{% endfor %}

{% if threads.object_list %}
<div class="pagination">
	<span class="step-links"> {% if threads.has_previous %} <a href="{{ threads.previous_page_number }}">previous</a> {% endif %} <span class="current"> Page {{ threads.number }} of {{ threads.paginator.num_pages }}. </span> {% if threads.has_next %} <a href="{{ threads.next_page_number }}">next</a> {% endif %} </span>
</div>
{% endif %}

{% endblock %}

{% block additionaljs %}
<script src="{{ STATIC_URL }}js/libs/jquery.expander.js"></script>
<script>
	$(document).ready(function() {
		$('span.expander').expander({
			userCollapseText : 'View Less',
			expandText : 'View More'
		});
	}); 
</script>
{% endblock %}