aboutsummaryrefslogtreecommitdiff
path: root/themes/alps
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-10-23 15:32:59 -0400
committerDrew DeVault <sir@cmpwn.com>2020-10-23 15:32:59 -0400
commit3db443c1df77804270f86e9e2afe92da52314685 (patch)
treeb811ec7e79e95315fad02cc113bc975473a67dac /themes/alps
parentbd91b3eacfb635004a31d2e62ef501441da126f3 (diff)
downloadalps-3db443c1df77804270f86e9e2afe92da52314685.tar.gz
alps-3db443c1df77804270f86e9e2afe92da52314685.zip
message.html: add tab to view raw email
Diffstat (limited to 'themes/alps')
-rw-r--r--themes/alps/message.html11
1 files changed, 6 insertions, 5 deletions
diff --git a/themes/alps/message.html b/themes/alps/message.html
index 5d5f64b..74e2d0b 100644
--- a/themes/alps/message.html
+++ b/themes/alps/message.html
@@ -11,7 +11,7 @@
{{if .IsText}}
href="?part={{.PathString}}"
{{else}}
- href="/raw?part={{.PathString}}"
+ href="{{$.Message.URL}}raw?part={{.PathString}}"
{{end}}
>
{{if eq $.Part.PathString .PathString}}<strong>{{end}}
@@ -178,15 +178,15 @@
{{ $html := .Message.HTMLPart }}
{{ $text := .Message.TextPart }}
<div class="tabs">
- {{ if and $html $text }}
- {{ if ne $html.PathString $text.PathString }}
{{/* https://github.com/golang/go/issues/31103 */}}
<a
- href="?part={{.Message.TextPart.PathString}}"
+ href="?part={{$text.PathString}}"
{{ if eq $text.PathString .Part.PathString }}
class="active"
{{ end }}
>Plain text</a>
+ {{ if and $html $text }}
+ {{ if ne $html.PathString $text.PathString }}
<a
href="?part={{$html.PathString}}"
{{ if eq $html.PathString .Part.PathString }}
@@ -195,12 +195,13 @@
>HTML</a>
{{ end }}
{{ end }}
+ <a href="{{.Message.URL}}/raw?plain=1">Raw email</a>
</div>
{{if .View}}
{{.View}}
{{else}}
<p>Can't preview this message part.</p>
- <a href="{{.Message.Uid}}/raw?part={{.Part.PathString}}">Download</a>
+ <a href="{{.Message.URL}}/raw?part={{.Part.PathString}}">Download</a>
{{end}}
</main>
</div>