From 8de93c50d2cf2144cfd3050cf7970a4ee9860bf4 Mon Sep 17 00:00:00 2001
From: Simon Ser
Date: Tue, 3 Dec 2019 19:48:28 +0100
Subject: Add basic pagination to message list
References: https://todo.sr.ht/~sircmpwn/koushin/22
---
public/mailbox.html | 15 ++++++++++++++-
public/message.html | 8 +++++++-
2 files changed, 21 insertions(+), 2 deletions(-)
(limited to 'public')
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 @@
+
+
+ {{if ge .PrevPage 0}}
+ Prev
+ {{end}}
+ {{if ge .NextPage 0}}
+ Next
+ {{end}}
+
{{else}}
Mailbox is empty.
{{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 @@
Back
-{{.Message.Envelope.Subject}}
+
+ {{if .Message.Envelope.Subject}}
+ {{.Message.Envelope.Subject}}
+ {{else}}
+ (No subject)
+ {{end}}
+
{{define "message-part-tree"}}
{{/* nested templates can't access the parent's context */}}
--
cgit v1.2.3-59-g8ed1b