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

(-)a/C4/Items.pm (-1 / +2 lines)
Lines 2102-2107 sub _SearchItems_build_where_fragment { Link Here
2102
        push @columns, Koha::Database->new()->schema()->resultset('Biblio')->result_source->columns;
2102
        push @columns, Koha::Database->new()->schema()->resultset('Biblio')->result_source->columns;
2103
        push @columns, Koha::Database->new()->schema()->resultset('Biblioitem')->result_source->columns;
2103
        push @columns, Koha::Database->new()->schema()->resultset('Biblioitem')->result_source->columns;
2104
        my @operators = qw(= != > < >= <= like);
2104
        my @operators = qw(= != > < >= <= like);
2105
        push @operators, 'not like';
2105
        my $field = $filter->{field};
2106
        my $field = $filter->{field};
2106
        if ( (0 < grep /^$field$/, @columns) or (substr($field, 0, 5) eq 'marc:') ) {
2107
        if ( (0 < grep /^$field$/, @columns) or (substr($field, 0, 5) eq 'marc:') ) {
2107
            my $op = $filter->{operator};
2108
            my $op = $filter->{operator};
Lines 2184-2190 A filter has the following keys: Link Here
2184
2185
2185
=item * query: the value to search in this column
2186
=item * query: the value to search in this column
2186
2187
2187
=item * operator: comparison operator. Can be one of = != > < >= <= like
2188
=item * operator: comparison operator. Can be one of = != > < >= <= like 'not like'
2188
2189
2189
=back
2190
=back
2190
2191
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-5 / +4 lines)
Lines 85-100 Link Here
85
    [% IF params.exists('op') %]
85
    [% IF params.exists('op') %]
86
        <select name="op" class="form-field-not">
86
        <select name="op" class="form-field-not">
87
           <option value="like">is</option>
87
           <option value="like">is</option>
88
            [% IF params.op == '!=' %]
88
            [% IF params.op == 'not like' %]
89
               <option value="!=" selected="selected">is not</option>
89
               <option value="not like" selected="selected">is not</option>
90
            [% ELSE %]
90
            [% ELSE %]
91
               <option value="!=">is not</option>
91
               <option value="not like">is not</option>
92
            [% END %]
92
            [% END %]
93
        </select>
93
        </select>
94
    [% ELSE %]
94
    [% ELSE %]
95
        <select name="op" class="form-field-not">
95
        <select name="op" class="form-field-not">
96
           <option value="like">is</option>
96
           <option value="like">is</option>
97
           <option value="!=">is not</option>
97
           <option value="not like">is not</option>
98
        </select>
98
        </select>
99
    [% END %]
99
    [% END %]
100
    <input type="text" name="q" class="form-field-value" value="" />
100
    <input type="text" name="q" class="form-field-value" value="" />
101
- 

Return to bug 20888