summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates/thread.html
blob: 41cee97892a6db704b0c7c123b4216466155e677 (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
{% extends "base.html" %}

{% load gravatar %}
{% load hk_generic %}
{% load storm %}


{% block title %}
{{ subject }} - {{ mlist.display_name|default:mlist.name|escapeemail }} - {{ app_name|title }}
{% endblock %}

{% block content %}

<div class="row-fluid">

{% include 'threads/month_list.html' %}

	<div class="span10">

		<div class="thread-header">
			{% for thread in neighbors %}
				{% if thread %}
				<a class="thread-{% ifequal forloop.counter 1 %}older{% else %}newer{% endifequal %}"
				   href="{% url thread threadid=thread.thread_id, mlist_fqdn=mlist.name %}"
				   >{{ thread.subject|strip_subject:mlist|truncatesmart:"22" }}</a>
				{% endif %}
			{% endfor %}
			<h1>{{ subject }}</h1>
		</div>

		<div class="row-fluid">

		<div class="span9">
		<!-- main section, the email thread -->
		<section id="thread_content">

			<!-- Start first email -->
			{% include 'messages/message.html' with email=first_mail unfolded='True' %}
			<!-- End first email -->

			<p class="sort-mode">
				{% if sort_mode == "date" %}
				<a href="{% url thread threadid=threadid, mlist_fqdn=mlist.name %}?sort=thread"
					>Show replies by thread</a>
				{% else %}
				<a href="{% url thread threadid=threadid, mlist_fqdn=mlist.name %}?sort=date"
					>Show replies by date</a>
				{% endif %}
			</p>

			<div class="replies">
				{% for email in replies %}
				<div class="{% cycle 'even' 'odd' %}"
					{% if email.level %}style="margin-left:{{ email.level|multiply:"2" }}em;"{% endif %}>
					<!-- Start email -->
					{% include 'messages/message.html' %}
					<!-- End of email -->
				</div>
				{% endfor %}
			</div>

		</section>
		</div>

		<div class="span3">
			{% include 'threads/right_col.html' %}
		</div>

		</div>

	</div>

</div>

<!-- end of content -->
{% endblock %}

{% block additionaljs %}

<script src="{{ STATIC_URL }}libs/jquery.expander.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		// hide quotes by default in the thread view
		$('div.email-body .quoted-text').each(function() {
			var linescount = $(this).text().split("\n").length;
			if (linescount > 3) {
				// hide if the quote is more than 3 lines long
				$(this).hide();
			}
		});
	});
</script>

{% endblock %}

{# vim: set noet: #}