blob: 50625a0f780ce5846dc934b78afd4365b66dcd62 (
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 43a7993ca9a6cf3b410adf4449580033ff19a4c9 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Thu, 16 Jan 2020 18:08:33 +0000
Subject: [PATCH 1/2] 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 b90cb08b..193e9a48 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -1189,7 +1189,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 paginate_recent ($$) {
--
2.35.1
|