From 042399269d593024cc8ed4a5d1e1251d435c5972 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 3 Jun 2020 18:50:02 -0700 Subject: basic pagination Not well tested --- fatcat_scholar/templates/search_macros.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'fatcat_scholar/templates/search_macros.html') diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 9676a6a..1b1ada2 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -181,6 +181,20 @@ {% endmacro %} +{% macro search_pagination(hits, top) %} +{% if hits.offset > 0 %} + +{% else %} + « Previous +{% endif %} +Showing results {{ hits.offset }} — {{ hits.offset + hits.limit }} out of {{ "{:,}".format(hits.count_found) }} results + +{% endmacro %} + {% macro query_option(options, selected) -%} {{ _(options.label) }}