aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/mailbox.html
blob: 93a45ce25dce928207d83654d08c868f41864b82 (plain) (blame)
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
{{template "head.html" .}}
{{template "nav.html" .}}

<div class="page-wrap">
  <aside>
    <!-- the logo image, dimensions 200x32 may be present or not -->
    <a href="/compose" class="new">Compose&nbsp;Mail</a>
    {{range .Mailboxes}}
      <a href="{{.URL}}" {{ if eq $.Mailbox.Name .Name }}class="active"{{ end }}>
        {{ if eq .Name "INBOX" }}
          Inbox
        {{ else }}
          {{ .Name }}
        {{ end }}

        {{ $unseen := 0 }}
        {{ if eq .Name "INBOX" }}
          {{ $unseen = $.Inbox.Unseen }}
        {{ end }}
        {{ if eq .Name $.Mailbox.Name }}
          {{ $unseen = $.Mailbox.Unseen }}
        {{ end }}
        {{ if $unseen }}({{ $unseen }}){{ end }}
      </a>
    {{end}}
  </aside>

  <div class="container">
    <form id="messages-form" method="post"></form>
    <main class="message-list">
      <section class="actions">
        {{ template "messages-header.html" . }}
      </section>
      <section class="messages">
        <div class="message-grid">
          {{range .Messages}}
          <div class="message-list-checkbox message-list-item {{ if not (.HasFlag "\\Seen") }}message-list-unread{{ end }}">
            <input type="checkbox" name="uids" value="{{.Uid}}" form="messages-form">
          </div>
          <div class="message-list-sender message-list-item {{ if not (.HasFlag "\\Seen") }}message-list-unread{{ end }}">
           {{ range .Envelope.From }}
            {{ if .PersonalName }}
              {{.PersonalName}}
            {{ else }}
              {{.MailboxName}}@{{.HostName}}
            {{ end }}
          {{ end }}
          </div>
          <div class="message-list-subject  message-list-item {{ if not (.HasFlag "\\Seen") }}message-list-unread{{ end }}">
            <a href="{{.TextPart.URL false}}">
              {{if .Envelope.Subject}}
                {{.Envelope.Subject}}
              {{else}}
                (No subject)
              {{end}}
            </a>
          </div>
          <div class="message-list-date  message-list-item {{ if not (.HasFlag "\\Seen") }}message-list-unread{{ end }}">
            {{ .Envelope.Date | formatdate }}
          </div>
          {{ end }}
          {{if not .Messages}}
          <p class="empty-list">Nothing here yet.</p>
          {{end}}
        </div>
      </section>
      <section class="actions">
        {{ template "messages-header.html" . }}
      </section>
    </main>
  </div>
</div>
{{template "foot.html"}}