aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/mailbox.html15
-rw-r--r--public/message.html8
2 files changed, 21 insertions, 2 deletions
diff --git a/public/mailbox.html b/public/mailbox.html
index e56efcb..435998c 100644
--- a/public/mailbox.html
+++ b/public/mailbox.html
@@ -20,10 +20,23 @@
<ul>
{{range .Messages}}
<li><a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
- {{.Envelope.Subject}}
+ {{if .Envelope.Subject}}
+ {{.Envelope.Subject}}
+ {{else}}
+ (No subject)
+ {{end}}
</a></li>
{{end}}
</ul>
+
+ <p>
+ {{if ge .PrevPage 0}}
+ <a href="?page={{.PrevPage}}">Prev</a>
+ {{end}}
+ {{if ge .NextPage 0}}
+ <a href="?page={{.NextPage}}">Next</a>
+ {{end}}
+ </p>
{{else}}
<p>Mailbox is empty.</p>
{{end}}
diff --git a/public/message.html b/public/message.html
index 2e1a308..5c18bd0 100644
--- a/public/message.html
+++ b/public/message.html
@@ -6,7 +6,13 @@
<a href="/mailbox/{{.Mailbox.Name | pathescape}}">Back</a>
</p>
-<h2>{{.Message.Envelope.Subject}}</h2>
+<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 */}}