summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates/messages/message.html
blob: 7140d7585063bbd14e9b30a6e9d1127316613761 (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
{% load url from future %}
{% load storm %}
{% load gravatar %}
{% load hk_generic %}
{% load tz %}

{% is_message_new email.date as is_new %}
<div class="email{% if unfolded %} email-first{% endif %}{% if is_new %} unread{% endif %}">

    <div class="email-header" id="{{email.message_id_hash}}">
        <div class="email-date inline-block pull-right">
            {% ifchanged %}
            <span class="date">
                {{email|get_date|date:"l, j F"}}
                {% if unfolded %}
                {{email|get_date|date:"Y"}}
                {% endif %}
            </span>
            {% endifchanged %}
            {% if unfolded %}<br />{% endif %}
            <span class="time" title="Sender's time: {% localtime off %}{{email|get_date|date:"l, j F H:i:s e"}}{% endlocaltime %}">{{email|get_date|date:"H:i:s"}}</span>
        </div>
        {% if is_new %}
            <i class="unread icon-eye-close" title="Unread"></i>
        {% endif %}
        <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 'public_user_profile' email=email.sender_email %}"
                title="See {{ email.sender_name|escapeemail|escape }}'s profile"
                >{{email.sender_name|escapeemail}}</a></span>
            <br />
            <span class="messagelink">
                (<a href="{% url 'message_index' mlist_fqdn=mlist.name message_id_hash=email.message_id_hash %}"
                    title="{{ email.subject }}">permalink</a>)
            </span>
            {% if use_mockups %}
            <br />
            <span class="rank">
                Rank 8
            </span>
            {% endif %}
        </div>
    </div>

    <div class="email-body"
     >{{ email.content|snip_quoted|wordwrap:90|urlizetrunc:76|escapeemail }}</div>

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

    <div class="email-info">
        {% include "messages/like_form.html" with message_id_hash=email.message_id_hash object=email %}
        {% if not unfolded and email.attachments|count %}
        <div 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=mlist.name message_id_hash=email.message_id_hash counter=attachment.counter filename=attachment.name %}">{{attachment.name}}</a>
                    ({{attachment.content_type}} &mdash; {{attachment.size|filesizeformat}})
                </li>
            {% endfor %}
            </ul>
        </div>
        {% endif %}
        {% include "messages/reply_form.html" with mlist_fqdn=mlist.name message_id_hash=email.message_id_hash %}
    </div>

</div>