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

(-)a/authorities/auth_finder.pl (+15 lines)
Lines 67-72 if ( $op eq "do_search" ) { Link Here
67
    my $orderby        = $query->param('orderby')        || '';
67
    my $orderby        = $query->param('orderby')        || '';
68
    my $startfrom      = $query->param('startfrom')      || 0;
68
    my $startfrom      = $query->param('startfrom')      || 0;
69
    my $resultsperpage = $query->param('resultsperpage') || 20;
69
    my $resultsperpage = $query->param('resultsperpage') || 20;
70
    my $est_headings   = $query->param('est_headings')   || undef;
71
72
    if ( $est_headings ) {
73
        #my @value_established = ( 'a', 'f', '|' );
74
        my @value_established = ( 'a' );
75
        foreach ( @value_established ) {
76
            push @marclist, 'Kind-of-record';
77
            push @and_or, 'or';
78
            push @excluding, '';
79
            push @operator, 'contains';
80
            push @value, $_;
81
        }
82
    }
70
83
71
    my $builder = Koha::SearchEngine::QueryBuilder->new(
84
    my $builder = Koha::SearchEngine::QueryBuilder->new(
72
        { index => $Koha::SearchEngine::AUTHORITIES_INDEX } );
85
        { index => $Koha::SearchEngine::AUTHORITIES_INDEX } );
Lines 76-81 if ( $op eq "do_search" ) { Link Here
76
        \@marclist, \@and_or, \@excluding, \@operator,
89
        \@marclist, \@and_or, \@excluding, \@operator,
77
        \@value, $authtypecode, $orderby
90
        \@value, $authtypecode, $orderby
78
    );
91
    );
92
79
    $template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate');
93
    $template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate');
80
    my $offset = $startfrom * $resultsperpage;
94
    my $offset = $startfrom * $resultsperpage;
81
    my ( $results, $total ) =
95
    my ( $results, $total ) =
Lines 176-181 if ( $op eq "do_search" ) { Link Here
176
        operator_main    => ( @operator > 1 && $operator[1] ) ? $operator[1] : '',
190
        operator_main    => ( @operator > 1 && $operator[1] ) ? $operator[1] : '',
177
        operator_match   => ( @operator > 2 && $operator[2] ) ? $operator[2] : '',
191
        operator_match   => ( @operator > 2 && $operator[2] ) ? $operator[2] : '',
178
        operator_any     => ( @operator > 3 && $operator[3] ) ? $operator[3] : '',
192
        operator_any     => ( @operator > 3 && $operator[3] ) ? $operator[3] : '',
193
        est_headings     => $est_headings,
179
    );
194
    );
180
}
195
}
181
else {
196
else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc (-1 / +22 lines)
Lines 117-122 Link Here
117
                    <input id="value_any" style="width:400px;" type="text" name="value_any" value="[% value_any | html %]" />
117
                    <input id="value_any" style="width:400px;" type="text" name="value_any" value="[% value_any | html %]" />
118
                    <div id="yvaluecontainermarclist"></div>
118
                    <div id="yvaluecontainermarclist"></div>
119
                </li>
119
                </li>
120
                <li>
121
                    <label for="est_headings">Established headings only: </label>
122
                    <select name="est_headings" id="est_headings">
123
                        [% IF Koha.Preference('LinkEstablishedHeadings') %]
124
                            [% IF est_headings %]
125
                                <option value="1" selected="selected">Yes</option>
126
                                <option value="">No</option>
127
                            [% ELSE %]
128
                                <option value="1">Yes</option>
129
                                <option value="" selected="selected">No</option>
130
                            [% END %]
131
                        [% ELSE %]
132
                            [% IF est_headings %]
133
                                <option value="1" selected="selected">Yes</option>
134
                                <option value="">No</option>
135
                            [% ELSE %]
136
                                <option value="1">Yes</option>
137
                                <option value="" selected="selected">No</option>
138
                            [% END %]
139
                        [% END %]
140
                    </select>
141
                </li>
120
        <li>
142
        <li>
121
        <label for="orderby">Sort by: </label>
143
        <label for="orderby">Sort by: </label>
122
        <select name="orderby" id="orderby">
144
        <select name="orderby" id="orderby">
123
- 

Return to bug 36616