Bugzilla – Attachment 90627 Details for
Bug 23122
When searching callnumber in simple search, search option is not retained
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23122: When searching callnumber in simple search, search option is not retained
Bug-23122-When-searching-callnumber-in-simple-sear.patch (text/plain), 3.28 KB, created by
Nick Clemens (kidclamp)
on 2019-06-14 18:46:19 UTC
(
hide
)
Description:
Bug 23122: When searching callnumber in simple search, search option is not retained
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-06-14 18:46:19 UTC
Size:
3.28 KB
patch
obsolete
>From e47eb0d8304ac705a768b2c7e32054ba87a561e3 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 14 Jun 2019 14:59:34 +0000 >Subject: [PATCH] Bug 23122: When searching callnumber in simple search, search > option is not retained > >This patch copies some code and markup from the staff client where call >number phrase searches are correctly handled. A check for >'ms_callnumcommaphr' is copied from search_indexes.inc. Handling of >commas and dashes is copied from search.pl. > >To test, apply the patch and make sure the >OpacAddMastheadLibraryPulldown system preference is enabled. > > - From the OPAC main page, select "Call number" from the search pull > down at the top of the page. > - Perform any search (it need not return results). > - Verify that the search option retains the "Call number" selection. > - Repeat the test with and without the OPACNumbersPreferPhrase system > preference enabled. > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> >Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 6 +++--- > opac/opac-search.pl | 5 ++++- > 2 files changed, 7 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 91f908e868..184a60527d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -191,11 +191,11 @@ > <option value="se">Series</option> > [% END # /ms_se %] > [% IF ( Koha.Preference('OPACNumbersPreferPhrase') ) %] >- [% IF ( ms_callnum ) %] >- <option selected="selected" value="callnum,phr">Call number</option> >+ [% IF ( ms_callnumcommaphr ) %] >+ <option selected="selected" value="callnum,phr">Call number</option> > [% ELSE %] > <option value="callnum,phr">Call number</option> >- [% END #/ms_callnum %] >+ [% END #/ms_callnumcommaphr %] > [% ELSE %] > [% IF ( ms_callnum ) %] > <option selected="selected" value="callnum">Call number</option> >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 309776f9f6..c39ad59b68 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -457,7 +457,10 @@ my @indexes = $cgi->multi_param('idx'); > > # if a simple index (only one) display the index used in the top search box > if ($indexes[0] && !$indexes[1]) { >- $template->param("ms_".$indexes[0] => 1); >+ my $idx = "ms_".$indexes[0]; >+ $idx =~ s/\,/comma/g; # template toolkit doesn't like variables with a , in it >+ $idx =~ s/-/dash/g; # template toolkit doesn't like variables with a dash in it >+ $template->param($idx => 1); > } > # an operand can be a single term, a phrase, or a complete ccl query > my @operands = $cgi->multi_param('q'); >-- >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 23122
:
90603
|
90615
|
90624
|
90626
| 90627