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

<div class="email_header">
	<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|urlizetrunc:76|escapeemail|snip_quoted }}</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">
{% if use_mockups %}
	<form method="post" action="{% url message_vote mlist_fqdn=list_address %}">
	<input type="hidden" name="hashid" value="{{ email.message_id_hash }}" />
	{% csrf_token %}
	<li class="likestatus {{ email.likestatus }}">
		+<span class="likecount">{{ email.likes }}</span>/-<span class="dislikecount">{{ email.dislikes }}</span>
	</li>
	<li class="voteup">
		<a class="youlike" href="#like">Like</a>
	</li>
	<li class="votedown">
		<a class="youdislike" href="#dislike">Dislike</a>
	</li>
	</form>
{% endif %}
{% 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: #}