View | Details | Raw Unified | Return to bug 20888
Collapse All | Expand All

(-)a/C4/Items.pm (-1 / +2 lines)
Lines 1333-1338 sub _SearchItems_build_where_fragment { Link Here
1333
        push @columns, Koha::Database->new()->schema()->resultset('Biblio')->result_source->columns;
1333
        push @columns, Koha::Database->new()->schema()->resultset('Biblio')->result_source->columns;
1334
        push @columns, Koha::Database->new()->schema()->resultset('Biblioitem')->result_source->columns;
1334
        push @columns, Koha::Database->new()->schema()->resultset('Biblioitem')->result_source->columns;
1335
        my @operators = qw(= != > < >= <= like);
1335
        my @operators = qw(= != > < >= <= like);
1336
        push @operators, 'not like';
1336
        my $field = $filter->{field} // q{};
1337
        my $field = $filter->{field} // q{};
1337
        if ( (0 < grep { $_ eq $field } @columns) or (substr($field, 0, 5) eq 'marc:') ) {
1338
        if ( (0 < grep { $_ eq $field } @columns) or (substr($field, 0, 5) eq 'marc:') ) {
1338
            my $op = $filter->{operator};
1339
            my $op = $filter->{operator};
Lines 1415-1421 A filter has the following keys: Link Here
1415
1416
1416
=item * query: the value to search in this column
1417
=item * query: the value to search in this column
1417
1418
1418
=item * operator: comparison operator. Can be one of = != > < >= <= like
1419
=item * operator: comparison operator. Can be one of = != > < >= <= like 'not like'
1419
1420
1420
=back
1421
=back
1421
1422
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-5 / +4 lines)
Lines 86-101 Link Here
86
    [% IF params.exists('op') %]
86
    [% IF params.exists('op') %]
87
        <select name="op" class="form-field-not">
87
        <select name="op" class="form-field-not">
88
           <option value="like">is</option>
88
           <option value="like">is</option>
89
            [% IF params.op == '!=' %]
89
            [% IF params.op == 'not like' %]
90
               <option value="!=" selected="selected">is not</option>
90
               <option value="not like" selected="selected">is not</option>
91
            [% ELSE %]
91
            [% ELSE %]
92
               <option value="!=">is not</option>
92
               <option value="not like">is not</option>
93
            [% END %]
93
            [% END %]
94
        </select>
94
        </select>
95
    [% ELSE %]
95
    [% ELSE %]
96
        <select name="op" class="form-field-not">
96
        <select name="op" class="form-field-not">
97
           <option value="like">is</option>
97
           <option value="like">is</option>
98
           <option value="!=">is not</option>
98
           <option value="not like">is not</option>
99
        </select>
99
        </select>
100
    [% END %]
100
    [% END %]
101
    <input type="text" name="q" class="form-field-value" value="" />
101
    <input type="text" name="q" class="form-field-value" value="" />
102
- 

Return to bug 20888