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