Bugzilla – Attachment 68720 Details for
Bug 18128
'Go to page' option for search results in opac and staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18128: Go to page option for search results in OPAC and staff
Bug-18128-Go-to-page-option-for-search-results-in-.patch (text/plain), 4.85 KB, created by
Jonathan Druart
on 2017-10-27 14:17:38 UTC
(
hide
)
Description:
Bug 18128: Go to page option for search results in OPAC and staff
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-27 14:17:38 UTC
Size:
4.85 KB
patch
obsolete
>From a8f0e1ba941039f8325a1a1801effb3e8e4b544c Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 16 Feb 2017 03:29:55 +0000 >Subject: [PATCH] Bug 18128: Go to page option for search results in OPAC and > staff > >This patch adds a dropdown of all available search result pages for a >user to jump to. > >To test: >1) Apply Bug 13205 >2) Do a search in OPAC and in staff client >3) Try to jump to different pages in the dropdown, confirm they always >work > >Sponsored-by: Catalyst IT > >Signed-off-by: Lee Jamison <ldjamison@marywood.edu> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc | 11 +++++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 4 ++++ > koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc | 10 ++++++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 6 ++++++ > 4 files changed, 31 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc >index 1c9bd33723..f19f26d2a1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc >@@ -15,4 +15,15 @@ > <li><a 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 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 %] >+ <li> <label for="goto_page">Go to page: </label> >+ <select name="goto_page" id="goto_page"> >+ [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %] >+ [% IF ( PAGE_NUMBER.highlight ) %] >+ <option value="[% PAGE_NUMBER.offset %]" selected>[% PAGE_NUMBER.pg %]</option> >+ [% ELSE %] >+ <option value="[% PAGE_NUMBER.offset %]">[% PAGE_NUMBER.pg %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> > </ul></nav>[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index b20150efc5..965392a460 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -50,6 +50,10 @@ function Dopop(link) { > } > > $(document).ready(function() { >+ $("#goto_page").change(function() { >+ var offset = $("#goto_page").find("option:selected").attr("value"); >+ window.location="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset="+offset+"[% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]"; >+ }); > > $("#searchheader").fixFloat(); > >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 fbfdfc8124..d0f02cd51f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc >@@ -17,5 +17,15 @@ > <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> >+ <label for="goto_page">Go to page: </label> >+ <select name="goto_page" id="goto_page"> >+ [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %] >+ [% IF ( PAGE_NUMBER.highlight ) %] >+ <option value="[% PAGE_NUMBER.offset %]" selected>[% PAGE_NUMBER.pg %]</option> >+ [% ELSE %] >+ <option value="[% PAGE_NUMBER.offset %]">[% PAGE_NUMBER.pg %]</option> >+ [% END %] >+ [% END %] >+ </select> > </div> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index a5a7c707f5..40225e723d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -700,6 +700,12 @@ function highlightOn() { > } > [% END %] > $(document).ready(function(){ >+ >+ $("#goto_page").change(function() { >+ var offset = $("#goto_page").find("option:selected").attr("value"); >+ window.location="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset="+offset+"[% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]"; >+ }); >+ > [% IF ( OpacHighlightedWords ) %] > $('a.title').each(function() { > $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]"); >-- >2.11.0
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 18128
:
60301
|
64940
|
64980
|
67778
|
68306
|
68325
|
68326
| 68720 |
68721