aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/public/mailbox.html
blob: 45729d15fd91e48453276023b7a5b8e372ea37ef (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
{{template "head.html" .}}

<h1>alps</h1>

<p>
  <a href="/logout">Logout</a>
  · <a href="/compose">Compose</a>
  · <a href="/settings">Settings</a>
</p>

<h2>{{.Mailbox.Name}}</h2>

<form method="get" action="">
  <input type="search" name="query" value="{{.Query}}">
  <input type="submit" value="Search">
</form>

<p>Mailboxes:</p>
<ul>
  {{range .Mailboxes}}
    <li><a href="/mailbox/{{.Name | pathescape}}">{{.Name}}</a></li>
  {{end}}
</ul>

{{if .Messages}}
  <p>Messages:</p>
  <ul>
    {{range .Messages}}
      <li>
        <a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
          {{if .Envelope.Subject}}
            {{.Envelope.Subject}}
          {{else}}
            (No subject)
          {{end}}
        </a>
        {{if .Attachments}}📎{{end}}
        {{if .HasFlag "\\Answered"}}{{end}}
        {{if .HasFlag "$Forwarded"}}{{end}}
        {{if .HasFlag "\\Flagged"}}{{end}}
      </li>
    {{end}}
  </ul>

  <p>
    {{if ge .PrevPage 0}}
      <a href="?page={{.PrevPage}}&query={{.Query}}">Prev</a>
    {{end}}
    {{if and (ge .PrevPage 0) (ge .NextPage 0)}}·{{end}}
    {{if ge .NextPage 0}}
      <a href="?page={{.NextPage}}&query={{.Query}}">Next</a>
    {{end}}
  </p>
{{else}}
  <p>No message.</p>
{{end}}

{{template "foot.html"}}