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

(-)a/catalogue/search.pl (-1 / +4 lines)
Lines 277-283 if ( $template_type eq 'advsearch' ) { Link Here
277
        @operators = $cgi->multi_param('op');
277
        @operators = $cgi->multi_param('op');
278
        @indexes   = $cgi->multi_param('idx');
278
        @indexes   = $cgi->multi_param('idx');
279
        $template->param(
279
        $template->param(
280
            sort => scalar $cgi->param('sort_by'),
280
            sort            => scalar $cgi->param('sort_by'),
281
            whole_record    => scalar $cgi->param('whole_record'),
282
            weighted_fields => scalar $cgi->param('weighted_fields'),
281
        );
283
        );
282
284
283
        # determine what to display next to the search boxes
285
        # determine what to display next to the search boxes
Lines 340-345 if ( $template_type eq 'advsearch' ) { Link Here
340
    {
342
    {
341
        $expanded = C4::Context->preference("expandedSearchOption") || 0
343
        $expanded = C4::Context->preference("expandedSearchOption") || 0
342
            if !defined($expanded) || $expanded !~ /^0|1$/;
344
            if !defined($expanded) || $expanded !~ /^0|1$/;
345
        $expanded = 1 if ( $cgi->param('whole_record') || $cgi->param('weighted_fields') );
343
        $template->param( expanded_options => $expanded );
346
        $template->param( expanded_options => $expanded );
344
    }
347
    }
345
348
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt (-3 / +4 lines)
Lines 153-162 Link Here
153
                    [% IF ( expanded_options ) %]
153
                    [% IF ( expanded_options ) %]
154
                        <p>
154
                        <p>
155
                            [% IF Koha.Preference('ElasticsearchMARCFormat') == 'ARRAY' %]
155
                            [% IF Koha.Preference('ElasticsearchMARCFormat') == 'ARRAY' %]
156
                                <label><input type="checkbox" name="whole_record" /> Search entire MARC record</label>
156
                                <label><input type="checkbox" name="whole_record" [% IF whole_record %]checked="checked"[% END %] /> Search entire MARC record</label>
157
                            [% END %]
157
                            [% END %]
158
                            <span id="weight_search">
158
                            <span id="weight_search">
159
                                <label><input type="checkbox" name="weight_search" checked="checked" /> Apply field weights to search</label>
159
                                <label
160
                                    ><input type="checkbox" name="weight_search" [% IF weighted_fields.defined %][% IF weighted_fields %]checked="checked"[% END %][% ELSE %]checked="checked"[% END %] /> Apply field weights to search</label
161
                                >
160
                            </span>
162
                            </span>
161
                        </p>
163
                        </p>
162
                    [% ELSE %]
164
                    [% ELSE %]
163
- 

Return to bug 40968