aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-03-09 23:24:53 -0800
committerBryan Newbold <bnewbold@archive.org>2021-03-09 23:24:55 -0800
commit1cc6a5ecf739c1a183800c90797f9bc771cfc299 (patch)
treefff067ccbdeae4427c1182f99f40ea16b7a7796b
parentc2be7c87604972c75f5ee8f5794018c378e586d8 (diff)
downloadfatcat-scholar-1cc6a5ecf739c1a183800c90797f9bc771cfc299.tar.gz
fatcat-scholar-1cc6a5ecf739c1a183800c90797f9bc771cfc299.zip
web: fix pagination limit
Reported by curiouscats on HN; thanks!
-rw-r--r--fatcat_scholar/templates/search_macros.html2
1 files changed, 1 insertions, 1 deletions
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 @@
<i style="padding-left: 0.5em; padding-right: 0.5em;">
{% 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 }} &mdash; {{ end }} out of {{ total }} results
{% endtrans %}