69ee06a490
Have changed my $last_page = $pages * ( $results_per_page - 1 ); to my $last_page = ( $pages - 1) * $results_per_page; which seems to fix the 'last' button offset! (Comment 10) Will add the box to jump to a page in a separate patch. Adding the pagination to the top on the staff client will be dealt with in Bug 18916 as it is slightly out of the scope of this bug. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21 lines
1.6 KiB
HTML
21 lines
1.6 KiB
HTML
[% IF ( PAGE_NUMBERS ) %]
|
|
<div class="pagination pagination-small noprint">
|
|
<ul>
|
|
[% IF ( previous_page_offset.defined ) %]
|
|
<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by |html %][% END %]">First</a></li>
|
|
<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% previous_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by |html %][% END %]">« Previous</a></li>
|
|
[% END %]
|
|
[% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
|
|
[% IF ( PAGE_NUMBER.highlight ) %]
|
|
<li class="active"><a href="#">[% PAGE_NUMBER.pg %]</a></li>
|
|
[% ELSE %]
|
|
<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&sort_by=[% sort_by |html%][% END %]">[% PAGE_NUMBER.pg %]</a></li>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( next_page_offset ) %]
|
|
<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% next_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by |html %][% END %]">Next »</a></li>
|
|
<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% last_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by |html %][% END %]">Last</a></li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
[% END %]
|