summaryrefslogtreecommitdiff
path: root/web-ui/app/templates/mails/full_view.hbs
blob: 8c486275b046d7ad4e7cfdb5bba634941ab98c31 (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
<button class="close-mail-button">
    <i class="fa fa-times"></i>
</button>

<div id="fullView-{{ ident }}" class="mail-read-view {{statuses}}">
    <header class="mail-read-view__header row">

        <!-- TODO -->
        <div class="column large-12 no-padding security-status">
            {{#if signatureStatus}}
            <span class="security-status__label {{ signatureStatus.cssClass }}">
              {{t signatureStatus.label }}
            </span>
            {{/if}}
            {{#if encryptionStatus}}
            <span class="security-status__label {{ encryptionStatus.cssClass }}">
              {{t encryptionStatus.label }}
            </span>
            {{/if}}
        </div>

        <div class="mail-read-view__header-recipients">
            <span class="mail-read-view__header-recipients--highlight-sender">
              {{#if header.from }}
                {{ header.from }}
              {{else}}
                {{t 'you'}}
              {{/if}}
            </span>
            <i class="fa fa-long-arrow-right"></i>
            {{{formatRecipients header}}}
        </div>

        <div class="mail-read-view__header-date">
            {{ formatDate header.date }}
        </div>

        <hr>

        <div class="mail-read-view__header-subject">
            <h3>{{ header.subject }}</h3>
        </div>

        <nav id="mail-actions" class="mail-read-view__header-actions"></nav>

        <ul class="mail-read-view__header-tags">
            <li class="mail-read-view__header-tags-label">
                <i class="fa fa-tags"></i>
            </li>

            {{#each tags }}
                <li class="mail-read-view__header-tags-tag" data-tag="{{this}}">{{ this }}</li>
            {{/each }}

            <li class="mail-read-view__header-tags-name-input">
                <input type="text" id="new-tag-input" placeholder="{{t 'Press Enter to add tag'}}"
                />
            </li>

            <li class="mail-read-view__header-tags-new-button">
                <button id="new-tag-button" class="no-style"><i class="fa fa-plus"></i></button>
            </li>
        </ul>
    </header>

    <iframe class="mail-read-view__body" id="read-sandbox" sandbox="allow-popups allow-scripts" src="sandbox/sandbox.html" scrolling="no"></iframe>

    {{#if attachments}}
        <hr>

        <div id="attachmentsArea" class="mail-read-view__attachments">
            <p class="mail-read-view__attachments-header"><i class="fa fa-paperclip"></i> {{ attachments.length }} attachment(s):</p>
            <ul>
                {{#each attachments }}
                <li class="mail-read-view__attachments-item">
                    <a class="mail-read-view__attachments-item-label" href="/attachment/{{ this.ident }}?content_type={{ this.content-type }}&encoding={{ this.encoding }}&filename={{ this.name }}">{{ this.name }} ({{ formatSize this.size}})
                    <i class="fa fa-arrow-down mail-read-view__attachments-item-download"></i></a>
                </li>
                {{/each }}
            </ul>
        </div>
    {{/if}}
</div>