blob: 811d6149d994ccd534ac0878447782e12bf749b1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From 054697a5129725f900a84bbdfee356a4f5373376 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Thu, 16 Jan 2020 18:08:33 +0000
Subject: [PATCH 3/5] view: don't show `page:' if no links follow it
---
lib/PublicInbox/View.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 39b04174..aebf7fe9 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -1157,7 +1157,9 @@ sub pagination_footer ($$) {
$next = $next ? "$next " : ' ';
$prev .= qq! <a\nhref='$latest'>latest</a>!;
}
- "<hr><pre>page: $next$prev</pre>";
+ if ($prev || $next) {
+ "<hr><pre>page: $next$prev</pre>";
+ }
}
sub index_nav { # callback for WwwStream
--
2.26.1
|