aboutsummaryrefslogtreecommitdiff
path: root/public/mailbox.html
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-03 19:48:28 +0100
committerSimon Ser <contact@emersion.fr>2019-12-03 19:49:04 +0100
commit8de93c50d2cf2144cfd3050cf7970a4ee9860bf4 (patch)
treebf161d7df1d4c73a7cdb2c2f365c5d0ca91f9b4c /public/mailbox.html
parent6344806755202babab99564bee362d9e5e238185 (diff)
downloadalps-8de93c50d2cf2144cfd3050cf7970a4ee9860bf4.tar.gz
alps-8de93c50d2cf2144cfd3050cf7970a4ee9860bf4.zip
Add basic pagination to message list
References: https://todo.sr.ht/~sircmpwn/koushin/22
Diffstat (limited to 'public/mailbox.html')
-rw-r--r--public/mailbox.html15
1 files changed, 14 insertions, 1 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}}