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.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'fatcat_scholar/templates/search.html') diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html index cfa4b74..9e2f06e 100644 --- a/fatcat_scholar/templates/search.html +++ b/fatcat_scholar/templates/search.html @@ -67,9 +67,22 @@ {% elif hits and hits.results %} {% if hits.results %} + {% if hits.offset != 0 %} +
+ {{ search_macros.search_pagination(hits) }} +
+ {% endif %} + + {# search results (rendered via macro) #} {% for paper in hits.results %} {{ search_macros.fulltext_search_result_row(paper) }} {% endfor %} + + {% if hits.count_found > hits.limit %} +
+ {{ search_macros.search_pagination(hits) }} +
+ {% endif %} {% endif %} {% elif hits %}
-- cgit v1.2.3