From 1cc6a5ecf739c1a183800c90797f9bc771cfc299 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 9 Mar 2021 23:24:53 -0800 Subject: web: fix pagination limit Reported by curiouscats on HN; thanks! --- fatcat_scholar/templates/search_macros.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 4ce0356..9524d7e 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -506,7 +506,7 @@ {% trans trimmed start=babel_numbers.format_number(hits.offset + 1, locale=locale), - end=babel_numbers.format_number(hits.offset + hits.limit, locale=locale), + end=babel_numbers.format_number([hits.offset + hits.limit, hits.count_found]|min, locale=locale), total=babel_numbers.format_number(hits.count_found, locale=locale) %} Showing results {{ start }} — {{ end }} out of {{ total }} results {% endtrans %} -- cgit v1.2.3