aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/mailbox.html
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-10-22 13:28:11 -0400
committerDrew DeVault <sir@cmpwn.com>2020-10-22 13:28:11 -0400
commitd4fd1c1fe2d057cdc809fefcb567f89c1df02bda (patch)
tree4162e6d7d8d59fc2e0ae37eaa17685c9969ac3af /themes/alps/mailbox.html
parent0191aa4698974cba0699fbe6543e492d2fb9d4a9 (diff)
downloadalps-d4fd1c1fe2d057cdc809fefcb567f89c1df02bda.tar.gz
alps-d4fd1c1fe2d057cdc809fefcb567f89c1df02bda.zip
Add message flags to mailbox page
Diffstat (limited to 'themes/alps/mailbox.html')
-rw-r--r--themes/alps/mailbox.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/themes/alps/mailbox.html b/themes/alps/mailbox.html
index fca34ba..b78a6e1 100644
--- a/themes/alps/mailbox.html
+++ b/themes/alps/mailbox.html
@@ -53,6 +53,28 @@
{{ end }}
{{ end }}
</div>
+ <div class="message-list-flags {{$classes}}">
+ {{if .Attachments}}<span class="Has attachments">📎</span>{{end}}
+ {{if .HasFlag "\\Answered"}}<span class="Replied">↩</span>{{end}}
+ {{if .HasFlag "$Forwarded"}}<span class="Forwarded">↪</span>{{end}}
+ <form method="POST" action="/message/{{.Mailbox}}/flag">
+ <input type="hidden" name="uids" value="{{.Message.Uid}}">
+ {{ if .HasFlag "\\Flagged" -}}
+ <input type="hidden" name="action" value="remove">
+ {{ else }}
+ <input type="hidden" name="action" value="add">
+ {{ end }}
+ <input type="hidden" name="flags" value="\Flagged">
+ <input type="hidden" name="next" value="{{$.GlobalData.URL.Path}}">
+ <button class="flag-button button-link" type="submit">
+ {{- if .HasFlag "\\Flagged" -}}
+ ★
+ {{- else -}}
+ ☆
+ {{- end -}}
+ </button>
+ </form>
+ </div>
<div class="message-list-subject {{$classes}}">
<a href="{{if .TextPart}}{{.TextPart.URL false}}{{else}}{{.URL}}{{end}}">
{{if .Envelope.Subject}}
@@ -70,6 +92,7 @@
<input type="checkbox" form="messages-form" disabled readonly>
</div>
<div class="message-list-sender {{$classes}}"></div>
+ <div class="message-list-flags {{$classes}}"></div>
<div class="message-list-subject {{$classes}}">
<em>(this email was deleted by another client)</em>
</div>