2020-05-13 10:58:22 -04:00
|
|
|
{{template "head.html" .}}
|
2019-12-02 19:55:52 +01:00
|
|
|
|
2020-05-13 14:07:44 +02:00
|
|
|
<h1>alps</h1>
|
2019-12-02 19:55:52 +01:00
|
|
|
|
2019-12-03 14:33:20 +01:00
|
|
|
<p>
|
2020-01-24 20:58:27 +01:00
|
|
|
<a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}">
|
|
|
|
Back
|
|
|
|
</a>
|
2019-12-03 14:33:20 +01:00
|
|
|
</p>
|
2019-12-02 19:55:52 +01:00
|
|
|
|
2019-12-03 19:48:28 +01:00
|
|
|
<h2>
|
2020-01-24 20:58:27 +01:00
|
|
|
{{if .Message.Envelope.Subject}}
|
|
|
|
{{.Message.Envelope.Subject}}
|
|
|
|
{{else}}
|
|
|
|
(No subject)
|
|
|
|
{{end}}
|
2019-12-03 19:48:28 +01:00
|
|
|
</h2>
|
2019-12-02 19:55:52 +01:00
|
|
|
|
2020-03-19 16:43:27 +01:00
|
|
|
<form method="post" action="/message/{{.Mailbox.Name | pathescape}}/move">
|
|
|
|
<input type="hidden" name="uids" value="{{.Message.Uid}}">
|
2020-01-24 20:58:27 +01:00
|
|
|
<label for="move-to">Move to:</label>
|
|
|
|
<select name="to" id="move-to">
|
|
|
|
{{range .Mailboxes}}
|
|
|
|
<option {{if eq .Name $.Mailbox.Name}}selected{{end}}>{{.Name}}</option>
|
|
|
|
{{end}}
|
|
|
|
</select>
|
|
|
|
<input type="submit" value="Move">
|
2019-12-16 17:25:53 +01:00
|
|
|
</form>
|
|
|
|
|
2020-03-19 16:43:27 +01:00
|
|
|
<form method="post" action="/message/{{.Mailbox.Name | pathescape}}/delete">
|
|
|
|
<input type="hidden" name="uids" value="{{.Message.Uid}}">
|
2020-01-24 20:58:27 +01:00
|
|
|
<input type="submit" value="Delete">
|
2019-12-16 17:45:20 +01:00
|
|
|
</form>
|
|
|
|
|
2019-12-17 12:42:04 +01:00
|
|
|
{{if .Flags}}
|
2020-03-19 16:43:27 +01:00
|
|
|
<form method="post" action="/message/{{.Mailbox.Name | pathescape}}/flag">
|
|
|
|
<input type="hidden" name="uids" value="{{.Message.Uid}}">
|
2020-01-24 20:58:27 +01:00
|
|
|
<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>
|
2019-12-17 12:42:04 +01:00
|
|
|
{{end}}
|
|
|
|
|
2019-12-17 13:02:38 +01:00
|
|
|
{{define "addr-list"}}
|
2020-01-24 20:58:27 +01:00
|
|
|
{{range $i, $addr := .}}
|
|
|
|
{{if $i}},{{end}}
|
|
|
|
{{.PersonalName}}
|
|
|
|
<<a href="/compose?to={{.Address}}">{{.Address}}</a>>
|
|
|
|
{{end}}
|
2019-12-17 13:02:38 +01:00
|
|
|
{{end}}
|
|
|
|
|
2019-12-17 11:28:47 +01:00
|
|
|
<ul>
|
2020-01-24 20:58:27 +01:00
|
|
|
<li>
|
|
|
|
<strong>Date</strong>: {{.Message.Envelope.Date | formatdate}}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<strong>From</strong>: {{template "addr-list" .Message.Envelope.From}}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<strong>To</strong>: {{template "addr-list" .Message.Envelope.To}}
|
|
|
|
</li>
|
|
|
|
{{if .Message.Envelope.Cc}}
|
|
|
|
<li>
|
|
|
|
<strong>Cc</strong>: {{template "addr-list" .Message.Envelope.Cc}}
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
{{if .Message.Envelope.Bcc}}
|
|
|
|
<li>
|
|
|
|
<strong>Bcc</strong>: {{template "addr-list" .Message.Envelope.Bcc}}
|
|
|
|
</li>
|
|
|
|
{{end}}
|
2019-12-17 11:28:47 +01:00
|
|
|
</ul>
|
|
|
|
|
2019-12-03 13:07:25 +01:00
|
|
|
{{define "message-part-tree"}}
|
2020-01-24 20:58:27 +01:00
|
|
|
{{/* nested templates can't access the parent's context */}}
|
|
|
|
{{$ = index . 0}}
|
|
|
|
{{with index . 1}}
|
|
|
|
<a
|
|
|
|
{{if .IsText}}
|
2020-02-25 16:38:29 +01:00
|
|
|
href="{{$.Message.URL}}?part={{.PathString}}"
|
2020-01-24 20:58:27 +01:00
|
|
|
{{else}}
|
2020-02-25 16:38:29 +01:00
|
|
|
href="{{$.Message.URL}}/raw?part={{.PathString}}"
|
2020-01-24 20:58:27 +01:00
|
|
|
{{end}}
|
|
|
|
>
|
2020-02-25 16:38:29 +01:00
|
|
|
{{if eq $.Part.PathString .PathString}}<strong>{{end}}
|
2020-01-24 20:58:27 +01:00
|
|
|
{{.String}}
|
2020-02-25 16:38:29 +01:00
|
|
|
{{if eq $.Part.PathString .PathString}}</strong>{{end}}
|
2020-01-24 20:58:27 +01:00
|
|
|
</a>
|
|
|
|
{{if .Children}}
|
|
|
|
<ul>
|
|
|
|
{{range .Children}}
|
|
|
|
<li>{{template "message-part-tree" (tuple $ .)}}</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2019-12-03 11:11:49 +01:00
|
|
|
{{end}}
|
|
|
|
|
2019-12-03 13:07:25 +01:00
|
|
|
<p>Parts:</p>
|
|
|
|
|
|
|
|
{{template "message-part-tree" (tuple $ .Message.PartTree)}}
|
|
|
|
|
|
|
|
<hr>
|
2019-12-03 11:11:49 +01:00
|
|
|
|
2020-02-12 14:42:51 +01:00
|
|
|
{{if .View}}
|
2020-01-24 20:58:27 +01:00
|
|
|
<p>
|
|
|
|
{{if .Message.HasFlag "\\Draft"}}
|
2020-02-25 16:38:29 +01:00
|
|
|
<a href="{{.Message.URL}}/edit?part={{.Part.PathString}}">Edit draft</a>
|
2020-01-24 20:58:27 +01:00
|
|
|
{{else}}
|
2020-03-18 15:01:15 +01:00
|
|
|
<a href="{{.Message.URL}}/reply?part={{.Part.PathString}}">Reply</a> ·
|
|
|
|
<a href="{{.Message.URL}}/forward?part={{.Part.PathString}}">Forward</a>
|
2020-01-24 20:58:27 +01:00
|
|
|
{{end}}
|
|
|
|
</p>
|
2020-02-12 14:42:51 +01:00
|
|
|
{{.View}}
|
2019-12-03 13:07:25 +01:00
|
|
|
{{else}}
|
2020-01-24 20:58:27 +01:00
|
|
|
<p>Can't preview this message part.</p>
|
2020-02-25 16:38:29 +01:00
|
|
|
<a href="{{.Message.URL}}/raw?part={{.Part.PathString}}">Download</a>
|
2019-12-03 11:11:49 +01:00
|
|
|
{{end}}
|
2019-12-02 19:55:52 +01:00
|
|
|
|
2019-12-09 14:59:58 +01:00
|
|
|
{{template "foot.html"}}
|