aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/public/message.html
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-17 12:42:04 +0100
committerSimon Ser <contact@emersion.fr>2019-12-17 12:42:04 +0100
commit2a2a48c7fafc4a32b1f4a4629e1d5447e29e8d57 (patch)
tree3f459e942f60a606e87bec00ae237039d9eea6bb /plugins/base/public/message.html
parent3aea768cad3a5c9bb2a16039beee4b3dc8ee9d48 (diff)
downloadalps-2a2a48c7fafc4a32b1f4a4629e1d5447e29e8d57.tar.gz
alps-2a2a48c7fafc4a32b1f4a4629e1d5447e29e8d57.zip
Add a form to set message flags
References: https://todo.sr.ht/~sircmpwn/koushin/36
Diffstat (limited to 'plugins/base/public/message.html')
-rw-r--r--plugins/base/public/message.html21
1 files changed, 20 insertions, 1 deletions
diff --git a/plugins/base/public/message.html b/plugins/base/public/message.html
index 0b7a8d5..56e6e6f 100644
--- a/plugins/base/public/message.html
+++ b/plugins/base/public/message.html
@@ -30,6 +30,25 @@
<input type="submit" value="Delete">
</form>
+{{if .Flags}}
+ <form method="post" action="{{.Message.Uid}}/flag">
+ <p>Flags:</p>
+ {{range $name, $has := .Flags}}
+ {{if ismutableflag $name}}
+ <input type="checkbox" name="flags" id="flag-{{$name}}"
+ value="{{$name}}" {{if $has}}checked{{end}}>
+ <label for="flag-{{$name}}">{{$name | formatflag}}</label>
+ <br>
+ {{else}}
+ {{if $has}}
+ <input type="hidden" name="flags" value="{{$name}}">
+ {{end}}
+ {{end}}
+ {{end}}
+ <input type="submit" value="Set flags">
+ </form>
+{{end}}
+
<ul>
<li>
<strong>Date</strong>: {{.Message.Envelope.Date | formatdate}}
@@ -67,7 +86,7 @@
{{.String}}
{{if eq $.PartPath .PathString}}</strong>{{end}}
</a>
- {{if gt (len .Children) 0}}
+ {{if .Children}}
<ul>
{{range .Children}}
<li>{{template "message-part-tree" (tuple $ .)}}</li>