From 78f762ee553daa73c15f3699198aa583a65c6543 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia 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 --- 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 1c9bd33..f19f26d 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 @@
  • Next >>
  • Last
  • [% END %] +
  •    + +
  • [% 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 fc212d9..f7b4803 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -73,6 +73,10 @@ function cartList(){ } } $(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 %]"; +}); $("#cartsubmit").click(function(){ cartList(); return false; 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 fbfdfc8..d0f02cd 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 @@
  • Last
  • [% END %] + + [% 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 528ace5..4b9f4d9 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.1.4