2019-12-02 18:55:52 +00:00
|
|
|
{{template "head"}}
|
|
|
|
|
|
|
|
<h1>koushin</h1>
|
|
|
|
|
|
|
|
<a href="/mailbox/{{.Mailbox.Name}}">Back</a>
|
|
|
|
|
|
|
|
<h2>{{.Message.Envelope.Subject}}</h2>
|
|
|
|
|
2019-12-03 12:07:25 +00:00
|
|
|
{{define "message-part-tree"}}
|
|
|
|
{{/* nested templates can't access the parent's context */}}
|
|
|
|
{{$ = index . 0}}
|
|
|
|
{{with index . 1}}
|
|
|
|
<a
|
|
|
|
{{if .IsText}}
|
|
|
|
href="{{$.Message.Uid}}?part={{.PathString}}"
|
|
|
|
{{else}}
|
|
|
|
href="{{$.Message.Uid}}/raw?part={{.PathString}}"
|
|
|
|
{{end}}
|
|
|
|
>
|
|
|
|
{{if eq $.PartPath .PathString}}<strong>{{end}}
|
|
|
|
{{.String}}
|
|
|
|
{{if eq $.PartPath .PathString}}</strong>{{end}}
|
|
|
|
</a>
|
|
|
|
{{if gt (len .Children) 0}}
|
|
|
|
<ul>
|
|
|
|
{{range .Children}}
|
|
|
|
<li>{{template "message-part-tree" (tuple $ .)}}</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
2019-12-03 10:11:49 +00:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{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
|
|
|
|
|
|
|
{{if .Body}}
|
|
|
|
<pre>{{.Body}}</pre>
|
2019-12-03 12:07:25 +00:00
|
|
|
{{else}}
|
|
|
|
<p>Can't preview this message part.</p>
|
|
|
|
<a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>
|
2019-12-03 10:11:49 +00:00
|
|
|
{{end}}
|
2019-12-02 18:55:52 +00:00
|
|
|
|
|
|
|
{{template "foot"}}
|