aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/message.html
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-10-23 15:15:46 -0400
committerDrew DeVault <sir@cmpwn.com>2020-10-23 15:15:46 -0400
commit64b16f4a5039bee9a97d3c69db0b49c5a9217908 (patch)
tree5b3968c915da53f19d4f398c2c30a2bae3154b6e /themes/alps/message.html
parentf97f38d4a9550bb15d39cfc05a3011e969927d22 (diff)
downloadalps-64b16f4a5039bee9a97d3c69db0b49c5a9217908.tar.gz
alps-64b16f4a5039bee9a97d3c69db0b49c5a9217908.zip
message.html: add tabs to select html/plaintext
Diffstat (limited to 'themes/alps/message.html')
-rw-r--r--themes/alps/message.html22
1 files changed, 20 insertions, 2 deletions
diff --git a/themes/alps/message.html b/themes/alps/message.html
index 713d3bc..c92d5ac 100644
--- a/themes/alps/message.html
+++ b/themes/alps/message.html
@@ -9,9 +9,9 @@
<a
class="nav-link"
{{if .IsText}}
- href="{{$.Message.URL}}?part={{.PathString}}"
+ href="?part={{.PathString}}"
{{else}}
- href="{{$.Message.URL}}/raw?part={{.PathString}}"
+ href="/raw?part={{.PathString}}"
{{end}}
>
{{if eq $.Part.PathString .PathString}}<strong>{{end}}
@@ -175,6 +175,24 @@
{{end}}
{{end}}
+ {{ $html := .Message.HTMLPart }}
+ {{ $text := .Message.TextPart }}
+ <div class="tabs">
+ {{ if and $html (ne $html.PathString $text.PathString) }}
+ <a
+ href="?part={{.Message.TextPart.PathString}}"
+ {{ if eq $text.PathString .Part.PathString }}
+ class="active"
+ {{ end }}
+ >Plain text</a>
+ <a
+ href="?part={{$html.PathString}}"
+ {{ if eq $html.PathString .Part.PathString }}
+ class="active"
+ {{ end }}
+ >HTML</a>
+ {{ end }}
+ </div>
{{if .View}}
{{.View}}
{{else}}