aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/message.html
diff options
context:
space:
mode:
authorEyal Sawady <ecs@d2evs.net>2020-06-25 17:36:55 -0400
committerSimon Ser <contact@emersion.fr>2020-06-29 16:37:41 +0200
commit50e131244ad78fd1e4c216770ff69471a6fcb03b (patch)
tree5b80dd544d54980230d4c3cafa244edca3cd8ce3 /themes/alps/message.html
parent0aff774c5d15fd3f63b8e2e586706b2802e13a4e (diff)
downloadalps-50e131244ad78fd1e4c216770ff69471a6fcb03b.tar.gz
alps-50e131244ad78fd1e4c216770ff69471a6fcb03b.zip
alps theme: fix nil on emails without a text part
Closes: https://todo.sr.ht/~emersion/alps/100
Diffstat (limited to 'themes/alps/message.html')
-rw-r--r--themes/alps/message.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/themes/alps/message.html b/themes/alps/message.html
index 1d74489..2926641 100644
--- a/themes/alps/message.html
+++ b/themes/alps/message.html
@@ -128,10 +128,10 @@
<span class="followups">
{{if .Message.HasFlag "\\Draft"}}
- <a class="action-group button-link" href="{{.Message.URL}}/edit?part={{.Message.TextPart.PathString}}">Edit draft</a>
+ <a class="action-group button-link" href="{{.Message.URL}}/edit{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Edit draft</a>
{{else}}
- <a class="action-group button-link" href="{{.Message.URL}}/reply?part={{.Message.TextPart.PathString}}">Reply</a>
- <a class="action-group button-link" href="{{.Message.URL}}/forward?part={{.Message.TextPart.PathString}}">Forward</a>
+ <a class="action-group button-link" href="{{.Message.URL}}/reply{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Reply</a>
+ <a class="action-group button-link" href="{{.Message.URL}}/forward{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Forward</a>
{{end}}
</span>
</div>