Nick Clemens
cc131475ed
This patch is to avoid hitting an error page. We should eventually make the max number returned configurable for ES. To test: 1 - Have Koha running ES with 10,000+ records 2 - Search for '*' 3 - Click 'Last' to view last page of results 4 - 'Cannot perform search' error 5 - Apply patch 6 - Search again 7 - View 'Last' page 8 - No error, you go to the last of 10000 9 - Note the warning above the pagination buttons Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19 lines
1.7 KiB
HTML
19 lines
1.7 KiB
HTML
[% IF ( PAGE_NUMBERS ) %]<nav><ul class="pagination">
|
|
[% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]<h6>10,000 results loaded, refine your search to view other records</h6>[% END %]
|
|
[% IF ( previous_page_offset.defined ) %]
|
|
<li><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]">First</a></li>
|
|
<!-- Row of numbers corresponding to search result pages -->
|
|
<li><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% previous_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]"><< Previous</a></li>
|
|
[% END %]
|
|
[% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
|
|
[% IF ( PAGE_NUMBER.highlight ) %]
|
|
<li class="active"><span>[% PAGE_NUMBER.pg %]</span></li>
|
|
[% ELSE %]
|
|
<li><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]">[% PAGE_NUMBER.pg %]</a></li>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( next_page_offset ) %]
|
|
<li><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% next_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]">Next >></a></li>
|
|
<li><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% last_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]">Last</a></li>
|
|
[% END %]
|
|
</ul></nav>[% END %]
|