summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates/messages/message.html
blob: 5d7261d5892ef4cd9f91a2ae1911f97de623eddc (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
{% load storm %}
{% load gravatar %}
{% load hk_generic %}

<div class="email_header" id="{{email.message_id_hash}}">
	<div class="email_date inline-block pull-right">
		{% ifchanged %}
		<span class="date">
			{{email|viewer_date|date:"l, j F"}}
			{% if unfolded %}
			{{email|viewer_date|date:"Y"}}
			{% endif %}
		</span>
		{% endifchanged %}
		{% if unfolded %}<br />{% endif %}
		<span class="time" title="Sender's time: {{email|sender_date|date:"l, j F H:i:s"}}">{{email|viewer_date|date:"H:i:s"}}</span>
	</div>
	<div class="gravatar{% if use_mockups %} pull-left{% endif %}">
		{% gravatar email.sender_email 40 %}
	</div>
	<div class="email_author inline-block">
		<span class="name"><a href="{% url message_index mlist_fqdn=list_address, hashid=email.message_id_hash %}">{{email.sender_name|escapeemail}}</a></span>
		{% if use_mockups %}
		<br />
		<span class="rank">
			Rank 8
		</span>
		{% endif %}
	</div>
</div>

<div class="{% if unfolded %}first_{% endif %}email_body"
 >{{ email.content|snip_quoted|wordwrap:90|urlizetrunc:76|escapeemail }}</div>

{% if unfolded and email.attachments|count %}
<p class="attachments">Attachments:</p>
<ul class="attachments-list">
{% for attachment in email.attachments %}
	<li><a href="{% url message_attachment mlist_fqdn=list_address, hashid=email.message_id_hash, counter=attachment.counter, filename=attachment.name %}">{{attachment.name}}</a>
		({{attachment.content_type}} &mdash; {{attachment.size|filesizeformat}})
	</li>
{% endfor %}
</ul>
{% endif %}

<ul class="email_info inline">
	{% include "messages/like_form.html" with hashid=email.message_id_hash object=email %}
	{% if not unfolded and email.attachments|count %}
	<li class="attachments">
		<a class="attachments" href="#attachments">{{ email.attachments|count }} attachment(s)</a>
		<ul class="attachments-list">
		{% for attachment in email.attachments %}
			<li><a href="{% url message_attachment mlist_fqdn=list_address, hashid=email.message_id_hash, counter=attachment.counter, filename=attachment.name %}">{{attachment.name}}</a>
				({{attachment.content_type}} &mdash; {{attachment.size|filesizeformat}})
			</li>
		{% endfor %}
		</ul>
	</li>
	{% endif %}
</ul>

{# vim: set noet: #}