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

(-)a/C4/Search.pm (-3 / +3 lines)
Lines 1585-1591 sub _build_initial_query { Link Here
1585
    my $operator = "";
1585
    my $operator = "";
1586
    if ($params->{previous_operand}){
1586
    if ($params->{previous_operand}){
1587
        #If there is a previous operand, add a supplied operator or the default 'and'
1587
        #If there is a previous operand, add a supplied operator or the default 'and'
1588
        $operator = ($params->{operator}) ? " ".($params->{operator})." " : ' and ';
1588
        $operator = ($params->{operator}) ? ($params->{operator}) : 'and';
1589
    }
1589
    }
1590
1590
1591
    #NOTE: indexes_set is typically set when doing truncation or field weighting
1591
    #NOTE: indexes_set is typically set when doing truncation or field weighting
Lines 1593-1606 sub _build_initial_query { Link Here
1593
1593
1594
    #e.g. "kw,wrdl:test"
1594
    #e.g. "kw,wrdl:test"
1595
    #e.g. " and kw,wrdl:test"
1595
    #e.g. " and kw,wrdl:test"
1596
    $params->{query} .= $operator . $operand;
1596
    $params->{query} .= " " . $operator . " " . $operand;
1597
1597
1598
    $params->{query_cgi} .= "&op=".uri_escape_utf8($operator) if $operator;
1598
    $params->{query_cgi} .= "&op=".uri_escape_utf8($operator) if $operator;
1599
    $params->{query_cgi} .= "&idx=".uri_escape_utf8($params->{index}) if $params->{index};
1599
    $params->{query_cgi} .= "&idx=".uri_escape_utf8($params->{index}) if $params->{index};
1600
    $params->{query_cgi} .= "&q=".uri_escape_utf8($params->{original_operand}) if $params->{original_operand};
1600
    $params->{query_cgi} .= "&q=".uri_escape_utf8($params->{original_operand}) if $params->{original_operand};
1601
1601
1602
    #e.g. " and kw,wrdl: test"
1602
    #e.g. " and kw,wrdl: test"
1603
    $params->{query_desc} .= $operator . ( $params->{index_plus} // q{} ) . " " . ( $params->{original_operand} // q{} );
1603
    $params->{query_desc} .= " " . $operator . " " . ( $params->{index_plus} // q{} ) . " " . ( $params->{original_operand} // q{} );
1604
1604
1605
    $params->{previous_operand} = 1 unless $params->{previous_operand}; #If there is no previous operand, mark this as one
1605
    $params->{previous_operand} = 1 unless $params->{previous_operand}; #If there is no previous operand, mark this as one
1606
1606
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt (-2 / +6 lines)
Lines 107-112 Link Here
107
    <legend>Search for </legend>
107
    <legend>Search for </legend>
108
    [% FOREACH query IN queries %]
108
    [% FOREACH query IN queries %]
109
        [% IF ( expanded_options ) %]
109
        [% IF ( expanded_options ) %]
110
        [% IF loop.first %]
111
        <div class="search-term-row" style="text-indent: 4.25em;">
112
        [% ELSE %]
110
        <div class="search-term-row">
113
        <div class="search-term-row">
111
            [% SET opindex = loop.index - 1 %]
114
            [% SET opindex = loop.index - 1 %]
112
            <select name="op">
115
            <select name="op">
Lines 124-129 Link Here
124
                <option value="not">not</option>
127
                <option value="not">not</option>
125
            [% END %]
128
            [% END %]
126
            </select>
129
            </select>
130
        [% END %]
127
        [% ELSE %]
131
        [% ELSE %]
128
        <div>
132
        <div>
129
        [% END %]
133
        [% END %]
Lines 131-137 Link Here
131
        [% INCLUDE 'search_indexes.inc' %]
135
        [% INCLUDE 'search_indexes.inc' %]
132
        <input type="text" size="30" name="q" title="Enter search terms" value="[% query | html %]" />
136
        <input type="text" size="30" name="q" title="Enter search terms" value="[% query | html %]" />
133
        [% IF ( expanded_options ) %]
137
        [% IF ( expanded_options ) %]
138
          [% IF ( loop.last ) %]
134
            <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
139
            <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
140
          [% END %]
135
          [% IF ( loop.first ) %]
141
          [% IF ( loop.first ) %]
136
            <label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" />
142
            <label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" />
137
          [% END %]
143
          [% END %]
Lines 238-244 Link Here
238
<!-- /BASIC LIMITS -->
244
<!-- /BASIC LIMITS -->
239
[% END %]
245
[% END %]
240
246
241
242
[% IF ( UNIMARC ) %]
247
[% IF ( UNIMARC ) %]
243
[% INCLUDE 'subtypes_unimarc.inc' %]
248
[% INCLUDE 'subtypes_unimarc.inc' %]
244
[% ELSE %]
249
[% ELSE %]
245
- 

Return to bug 22605