Bugzilla – Attachment 84692 Details for
Bug 20888
Allow use of boolean operator 'not' in item search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20888: Allow use of boolean operator 'not' in item search
Bug-20888-Allow-use-of-boolean-operator-not-in-ite.patch (text/plain), 2.69 KB, created by
Matthias Meusburger
on 2019-02-04 10:34:24 UTC
(
hide
)
Description:
Bug 20888: Allow use of boolean operator 'not' in item search
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2019-02-04 10:34:24 UTC
Size:
2.69 KB
patch
obsolete
>From ba0107a67053a0f8f3ad8651422bac6b38ad7bc0 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Thu, 10 Jan 2019 10:48:38 +0100 >Subject: [PATCH] Bug 20888: Allow use of boolean operator 'not' in item search > >Test plan: > > - Apply the patch > - Check that you have a 'is not' option in the third box in item search > - Check that you can exclude items from the search results with this 'is not' option > - Check that you can still combine parameters with 'and' and 'or' > - Check that the exclusion works for custom fields (see Administration > Item search fields) > - Check that the exclusion works for custom fields linked to authorised values >--- > .../prog/en/modules/catalogue/itemsearch.tt | 20 +++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index a7abe0f..b4c1695 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -81,8 +81,22 @@ > </optgroup> > [% END %] > </select> >+ [% IF params.exists('op') %] >+ <select name="op" class="form-field-not"> >+ <option value="like">is</option> >+ [% IF params.op == '!=' %] >+ <option value="!=" selected="selected">is not</option> >+ [% ELSE %] >+ <option value="!=">is not</option> >+ [% END %] >+ </select> >+ [% ELSE %] >+ <select name="op" class="form-field-not"> >+ <option value="like">is</option> >+ <option value="!=">is not</option> >+ </select> >+ [% END %] > <input type="text" name="q" class="form-field-value" value="" /> >- <input type="hidden" name="op" value="like" /> > </div> > [% END %] > >@@ -220,7 +234,7 @@ > [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %] > [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %] > <script type="text/javascript"> >- var authorised_values = [% authorised_values_json | html %]; >+ var authorised_values = [% authorised_values_json %]; > > function loadAuthorisedValuesSelect(select) { > var selected = select.find('option:selected'); >@@ -424,7 +438,7 @@ > form_field.append(button_field_new); > > // If a field is linked to an authorised values list, display the list. >- $('div.form-field-select-text select').change(function() { >+ $('div.form-field-select-text select.form-field-column').change(function() { > loadAuthorisedValuesSelect($(this)); > }).change(); > >-- >2.7.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 20888
:
84692
|
85281
|
93347
|
93370
|
97626
|
97627
|
111265
|
111266
|
111267
|
112453
|
112454
|
112455
|
112691
|
112692
|
112693