aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/public/message.html
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/public/message.html')
-rw-r--r--plugins/base/public/message.html188
1 files changed, 94 insertions, 94 deletions
diff --git a/plugins/base/public/message.html b/plugins/base/public/message.html
index 3dc7f62..a973881 100644
--- a/plugins/base/public/message.html
+++ b/plugins/base/public/message.html
@@ -3,105 +3,105 @@
<h1>koushin</h1>
<p>
- <a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}">
- Back
- </a>
+ <a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}">
+ Back
+ </a>
</p>
<h2>
- {{if .Message.Envelope.Subject}}
- {{.Message.Envelope.Subject}}
- {{else}}
- (No subject)
- {{end}}
+ {{if .Message.Envelope.Subject}}
+ {{.Message.Envelope.Subject}}
+ {{else}}
+ (No subject)
+ {{end}}
</h2>
<form method="post" action="{{.Message.Uid}}/move">
- <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">
+ <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">
</form>
<form method="post" action="{{.Message.Uid}}/delete">
- <input type="submit" value="Delete">
+ <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>
+ <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}}
{{define "addr-list"}}
- {{range $i, $addr := .}}
- {{if $i}},{{end}}
- {{.PersonalName}}
- &lt;<a href="/compose?to={{.Address}}">{{.Address}}</a>&gt;
- {{end}}
+ {{range $i, $addr := .}}
+ {{if $i}},{{end}}
+ {{.PersonalName}}
+ &lt;<a href="/compose?to={{.Address}}">{{.Address}}</a>&gt;
+ {{end}}
{{end}}
<ul>
- <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}}
+ <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}}
</ul>
{{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 .Children}}
- <ul>
- {{range .Children}}
- <li>{{template "message-part-tree" (tuple $ .)}}</li>
- {{end}}
- </ul>
- {{end}}
- {{end}}
+ {{/* 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 .Children}}
+ <ul>
+ {{range .Children}}
+ <li>{{template "message-part-tree" (tuple $ .)}}</li>
+ {{end}}
+ </ul>
+ {{end}}
+ {{end}}
{{end}}
<p>Parts:</p>
@@ -111,23 +111,23 @@
<hr>
{{if .Body}}
- <p>
- {{if .Message.HasFlag "\\Draft"}}
- <a href="{{.Message.Uid}}/edit?part={{.PartPath}}">Edit draft</a>
- {{else}}
- <a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a>
- {{end}}
- </p>
- {{if .IsHTML}}
- <!-- allow-same-origin is required to resize the frame with its content -->
- <!-- allow-popups is required for target="_blank" links -->
- <iframe id="email-frame" srcdoc="{{.Body}}" sandbox="allow-same-origin allow-popups"></iframe>
- {{else}}
- <pre>{{.Body}}</pre>
- {{end}}
+ <p>
+ {{if .Message.HasFlag "\\Draft"}}
+ <a href="{{.Message.Uid}}/edit?part={{.PartPath}}">Edit draft</a>
+ {{else}}
+ <a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a>
+ {{end}}
+ </p>
+ {{if .IsHTML}}
+ <!-- allow-same-origin is required to resize the frame with its content -->
+ <!-- allow-popups is required for target="_blank" links -->
+ <iframe id="email-frame" srcdoc="{{.Body}}" sandbox="allow-same-origin allow-popups"></iframe>
+ {{else}}
+ <pre>{{.Body}}</pre>
+ {{end}}
{{else}}
- <p>Can't preview this message part.</p>
- <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>
+ <p>Can't preview this message part.</p>
+ <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>
{{end}}
{{template "foot.html"}}