Bugzilla – Attachment 60300 Details for
Bug 13205
Last/First page options for result list paging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13205: Last/first page options for result list paging for OPAC
Bug-13205-Lastfirst-page-options-for-result-list-p.patch (text/plain), 4.29 KB, created by
Aleisha Amohia
on 2017-02-16 02:29:16 UTC
(
hide
)
Description:
Bug 13205: Last/first page options for result list paging for OPAC
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-02-16 02:29:16 UTC
Size:
4.29 KB
patch
obsolete
>From 9cd5c9e325ab9febd4231d4cb74c44eb6a75717b Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 16 Feb 2017 02:28:13 +0000 >Subject: [PATCH] Bug 13205: Last/first page options for result list paging for > OPAC > >Same fix but on OPAC side. Same test plan > >Sponsored-by: Catalyst IT >--- > .../bootstrap/en/includes/page-numbers.inc | 26 ++++++++++++---------- > opac/opac-search.pl | 2 ++ > 2 files changed, 16 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc >index f18c9ce..63e083e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc >@@ -1,19 +1,21 @@ > [% 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 %]&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> >+ <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> >+ [% IF ( previous_page_offset.defined ) %] >+ <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 %] >- [% 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> >- [% 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> >+ [% END %] >+ <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% last_page %][% IF ( sort_by ) %]&sort_by=[% sort_by |html %][% END %]">Last</a></li> > </ul> > </div> > [% END %] >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 15e24b3..85065aa 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -836,6 +836,7 @@ for (my $i=0;$i<@servers;$i++) { > my @page_numbers; > # total number of pages there will be > my $pages = ceil($hits / $results_per_page); >+ my $last_page = ($pages * $results_per_page) - $results_per_page; > # default page number > my $current_page_number = 1; > if ($offset) { >@@ -886,6 +887,7 @@ for (my $i=0;$i<@servers;$i++) { > > } > $template->param( PAGE_NUMBERS => \@page_numbers, >+ last_page => $last_page, > previous_page_offset => $previous_page_offset) unless $pages < 2; > $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number; > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13205
:
60229
|
60248
|
60300
|
61194
|
64670
|
64938
|
64981
|
64982
|
64983
|
64984
|
67774
|
67775
|
67776
|
67777