aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/public
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-17 13:02:38 +0100
committerSimon Ser <contact@emersion.fr>2019-12-17 13:02:38 +0100
commite2d70ba6cab2e18063bd5b457cd861700cbbc9e7 (patch)
tree1ea907bdcb4510baf86d55c3a824ecf7abb71cf9 /plugins/base/public
parent0c21c501ff603d044ff003c06abea9fd1e876280 (diff)
downloadalps-e2d70ba6cab2e18063bd5b457cd861700cbbc9e7.tar.gz
alps-e2d70ba6cab2e18063bd5b457cd861700cbbc9e7.zip
Linkify address lists
Diffstat (limited to 'plugins/base/public')
-rw-r--r--plugins/base/public/message.html16
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/base/public/message.html b/plugins/base/public/message.html
index 56e6e6f..b41ae39 100644
--- a/plugins/base/public/message.html
+++ b/plugins/base/public/message.html
@@ -49,24 +49,32 @@
</form>
{{end}}
+{{define "addr-list"}}
+ {{range $i := .}}
+ {{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>: {{.Message.Envelope.From | formataddrlist}}
+ <strong>From</strong>: {{template "addr-list" .Message.Envelope.From}}
</li>
<li>
- <strong>To</strong>: {{.Message.Envelope.To | formataddrlist}}
+ <strong>To</strong>: {{template "addr-list" .Message.Envelope.To}}
</li>
{{if .Message.Envelope.Cc}}
<li>
- <strong>Cc</strong>: {{.Message.Envelope.Cc | formataddrlist}}
+ <strong>Cc</strong>: {{template "addr-list" .Message.Envelope.Cc}}
</li>
{{end}}
{{if .Message.Envelope.Bcc}}
<li>
- <strong>Bcc</strong>: {{.Message.Envelope.Bcc | formataddrlist}}
+ <strong>Bcc</strong>: {{template "addr-list" .Message.Envelope.Bcc}}
</li>
{{end}}
</ul>