View | Details | Raw Unified | Return to bug 19502
Collapse All | Expand All

(-)a/catalogue/search.pl (+2 lines)
Lines 620-625 for (my $i=0;$i<@servers;$i++) { Link Here
620
            ## Build the page numbers on the bottom of the page
620
            ## Build the page numbers on the bottom of the page
621
            my @page_numbers;
621
            my @page_numbers;
622
            my $hits_to_paginate = C4::Context->preference('SearchEngine') eq 'Elasticsearch' ? 10000 : $hits;
622
            my $hits_to_paginate = C4::Context->preference('SearchEngine') eq 'Elasticsearch' ? 10000 : $hits;
623
            $template->param( hits_to_paginate => $hits_to_paginate );
623
            # total number of pages there will be
624
            # total number of pages there will be
624
            my $pages = ceil($hits_to_paginate / $results_per_page);
625
            my $pages = ceil($hits_to_paginate / $results_per_page);
625
            my $last_page_offset = ( $pages -1 ) * $results_per_page;
626
            my $last_page_offset = ( $pages -1 ) * $results_per_page;
Lines 676-681 for (my $i=0;$i<@servers;$i++) { Link Here
676
                                last_page_offset => $last_page_offset,
677
                                last_page_offset => $last_page_offset,
677
                                previous_page_offset => $previous_page_offset) unless $pages < 2;
678
                                previous_page_offset => $previous_page_offset) unless $pages < 2;
678
            $template->param(   next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
679
            $template->param(   next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
680
            warn "topage $hits_to_paginate";
679
        }
681
        }
680
682
681
683
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc (-1 / +1 lines)
Lines 1-5 Link Here
1
[% IF ( PAGE_NUMBERS ) %]<nav><ul class="pagination">
1
[% IF ( PAGE_NUMBERS ) %]<nav><ul class="pagination">
2
 [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]<h6>10,000 results loaded, refine your search to view other records</h6>[% END %]
2
 [% IF hits_to_paginate < total %]<h6>[% hits_to_paginate %] of [% total %] results loaded, refine your search to view other records</h6>[% END %]
3
    [% IF ( previous_page_offset.defined ) %]
3
    [% IF ( previous_page_offset.defined ) %]
4
        <li><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">First</a></li>
4
        <li><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">First</a></li>
5
        <!-- Row of numbers corresponding to search result pages -->
5
        <!-- Row of numbers corresponding to search result pages -->
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc (-1 / +1 lines)
Lines 1-6 Link Here
1
[% IF ( PAGE_NUMBERS ) %]
1
[% IF ( PAGE_NUMBERS ) %]
2
    <div class="pagination pagination-small noprint">
2
    <div class="pagination pagination-small noprint">
3
     [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]<h6>10000 results loaded, refine your search to view other records</h6>[% END %]
3
     [% IF hits_to_paginate < total %]<h6>[% hits_to_paginate %] of [% total %] results loaded, refine your search to view other records</h6>[% END %]
4
        <ul>
4
        <ul>
5
            [% IF ( previous_page_offset.defined ) %]
5
            [% IF ( previous_page_offset.defined ) %]
6
                <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">First</a></li>
6
                <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">First</a></li>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/search/page-numbers.inc (-1 / +1 lines)
Lines 1-6 Link Here
1
[% IF ( PAGE_NUMBERS ) %]
1
[% IF ( PAGE_NUMBERS ) %]
2
  <div class="pages">
2
  <div class="pages">
3
   [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]<h6>10000 results loaded, refine your search to view other records</h6>[% END %]
3
   [% IF hits_to_paginate < total %]<h6>[% hits_to_paginate %] of [% total %] results loaded, refine your search to view other records</h6>[% END %]
4
    [% IF ( previous_page ) %]
4
    [% IF ( previous_page ) %]
5
      <a class="nav" href="?[% FOREACH fp IN follower_params %][% fp.var |url %]=[% fp.val |url %]&amp;[% END %]page=[% previous_page |url %]">&lt;&lt; Previous</a>
5
      <a class="nav" href="?[% FOREACH fp IN follower_params %][% fp.var |url %]=[% fp.val |url %]&amp;[% END %]page=[% previous_page |url %]">&lt;&lt; Previous</a>
6
    [% END %]
6
    [% END %]
(-)a/opac/opac-search.pl (-1 / +1 lines)
Lines 831-836 for (my $i=0;$i<@servers;$i++) { Link Here
831
            ## Build the page numbers on the bottom of the page
831
            ## Build the page numbers on the bottom of the page
832
            my @page_numbers;
832
            my @page_numbers;
833
            my $hits_to_paginate = C4::Context->preference('SearchEngine') eq 'Elasticsearch' ? 10000 : $hits;
833
            my $hits_to_paginate = C4::Context->preference('SearchEngine') eq 'Elasticsearch' ? 10000 : $hits;
834
            $template->param( hits_to_paginate => $hits_to_paginate );
834
            # total number of pages there will be
835
            # total number of pages there will be
835
            my $pages = ceil($hits_to_paginate / $results_per_page);
836
            my $pages = ceil($hits_to_paginate / $results_per_page);
836
            my $last_page_offset = ( $pages - 1 ) * $results_per_page;
837
            my $last_page_offset = ( $pages - 1 ) * $results_per_page;
837
- 

Return to bug 19502