diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-16 12:51:42 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-16 12:52:44 +0100 |
commit | d897eeee5c4d163891d0b6a8f85d328ccada7575 (patch) | |
tree | 39d2428b8f9cb677d79e66cb3763cdaed6147616 /plugins/base/public/message.html | |
parent | e83844fbad63a0d6fc2d29a8a412c95f2a419b56 (diff) | |
download | alps-d897eeee5c4d163891d0b6a8f85d328ccada7575.tar.gz alps-d897eeee5c4d163891d0b6a8f85d328ccada7575.zip |
Introduce base plugin
This plugin offers base IMAP/SMTP functionality.
References: https://todo.sr.ht/~sircmpwn/koushin/39
Diffstat (limited to 'plugins/base/public/message.html')
-rw-r--r-- | plugins/base/public/message.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/base/public/message.html b/plugins/base/public/message.html new file mode 100644 index 0000000..729937d --- /dev/null +++ b/plugins/base/public/message.html @@ -0,0 +1,58 @@ +{{template "head.html"}} + +<h1>koushin</h1> + +<p> + <a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}"> + Back + </a> +</p> + +<h2> + {{if .Message.Envelope.Subject}} + {{.Message.Envelope.Subject}} + {{else}} + (No subject) + {{end}} +</h2> + +{{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> + {{end}} + {{end}} +{{end}} + +<p>Parts:</p> + +{{template "message-part-tree" (tuple $ .Message.PartTree)}} + +<hr> + +{{if .Body}} + <p><a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a></p> + <pre>{{.Body}}</pre> +{{else}} + <p>Can't preview this message part.</p> + <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a> +{{end}} + +{{template "foot.html"}} |