Browse Source

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

Signed-off-by: Amandine Zocca <azocca@ville-montauban.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Matthias Meusburger 5 years ago
committed by Jonathan Druart
parent
commit
781b5a4118
  1. 18
      koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

18
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

@ -84,8 +84,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 %]
@ -552,7 +566,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[name="f"]').change(function() {
$('div.form-field-select-text select.form-field-column').change(function() {
loadAuthorisedValuesSelect($(this));
}).change();

Loading…
Cancel
Save