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

(-)a/C4/Items.pm (-1 / +2 lines)
Lines 1329-1334 sub _SearchItems_build_where_fragment { Link Here
1329
        push @columns, Koha::Database->new()->schema()->resultset('Biblio')->result_source->columns;
1329
        push @columns, Koha::Database->new()->schema()->resultset('Biblio')->result_source->columns;
1330
        push @columns, Koha::Database->new()->schema()->resultset('Biblioitem')->result_source->columns;
1330
        push @columns, Koha::Database->new()->schema()->resultset('Biblioitem')->result_source->columns;
1331
        my @operators = qw(= != > < >= <= like);
1331
        my @operators = qw(= != > < >= <= like);
1332
        push @operators, 'not like';
1332
        my $field = $filter->{field} // q{};
1333
        my $field = $filter->{field} // q{};
1333
        if ( (0 < grep { $_ eq $field } @columns) or (substr($field, 0, 5) eq 'marc:') ) {
1334
        if ( (0 < grep { $_ eq $field } @columns) or (substr($field, 0, 5) eq 'marc:') ) {
1334
            my $op = $filter->{operator};
1335
            my $op = $filter->{operator};
Lines 1411-1417 A filter has the following keys: Link Here
1411
1412
1412
=item * query: the value to search in this column
1413
=item * query: the value to search in this column
1413
1414
1414
=item * operator: comparison operator. Can be one of = != > < >= <= like
1415
=item * operator: comparison operator. Can be one of = != > < >= <= like 'not like'
1415
1416
1416
=back
1417
=back
1417
1418
(-)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