aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/messages-header.html
blob: 44cb78b1c543575698c24893e04daa843b6bdec9 (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
<div class="message-list-checkbox">
  <input type="checkbox" id="action-checkbox-all"/>
</div>
<div class="actions-wrap">
  <div class="actions-message">
    <div class="action-group">
      {{ if and (eq .Mailbox.Name "INBOX") (not (eq .Mailbox.Name "Archive")) }}
      <button form="messages-form" formaction="/message/{{.Mailbox.Name | pathescape}}/move?to=Archive">Archive</button>
      {{ end }}
    </div>

    <div class="action-group">
      {{ if or (eq .Mailbox.Name "INBOX") (eq .Mailbox.Name "Trash") }}
      <button form="messages-form" formaction="/message/{{.Mailbox.Name | pathescape}}/move?to=Junk">Report Spam</button>
      {{ end }}
    </div>

    <div class="action-group">
      {{ if ne .Mailbox.Name "Trash"}}
      <button form="messages-form" formaction="/message/{{.Mailbox.Name | pathescape}}/move?to=Trash">Delete</button>
      {{ else }}
      <button form="messages-form" formaction="/message/{{.Mailbox.Name | pathescape}}/delete">Delete Permanently</button>
      {{ end }}
    </div>

    <div class="action-group">
      <a href="{{ .GlobalData.URL.String }}" class="button-link">Refresh</a>
    </div>
  </div>

  <form method="get" class="actions-search">
    <input type="text" name="query" value="{{.Query}}" placeholder="Search messages...">
    <button>Search</button>
  </form>

  {{if or (ge .PrevPage 0) (ge .NextPage 0) }}
  <div class="actions-pagination">
    {{if ge .PrevPage 0}}
      {{if ge .PrevPage 1}}<a href="?page=0" class="button-link">«</a>{{ end }}
      <a href="?page={{.PrevPage}}" class="button-link"></a>
    {{end}}
    {{if ge .NextPage 0}}
      <a href="?page={{.NextPage}}" class="button-link"></a>
    {{end}}
  </div>
  {{ end }}
</div>