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

(-)a/C4/Breeding.pm (-6 / +17 lines)
Lines 156-165 sub Z3950Search { Link Here
156
    );
156
    );
157
    my @servers = $rs->all;
157
    my @servers = $rs->all;
158
    foreach my $server ( @servers ) {
158
    foreach my $server ( @servers ) {
159
        my $server_zquery = $zquery;
160
        if(my $attributes = $server->{attributes}){
161
            $server_zquery = "$attributes $zquery";
162
        }
159
        $oConnection[$s] = _create_connection( $server );
163
        $oConnection[$s] = _create_connection( $server );
160
        $oResult[$s] =
164
        $oResult[$s] =
161
            $server->{servertype} eq 'zed'?
165
            $server->{servertype} eq 'zed'?
162
                $oConnection[$s]->search_pqf( $zquery ):
166
                $oConnection[$s]->search_pqf( $server_zquery ):
163
                $oConnection[$s]->search(new ZOOM::Query::CQL(
167
                $oConnection[$s]->search(new ZOOM::Query::CQL(
164
                    _translate_query( $server, $squery )));
168
                    _translate_query( $server, $squery )));
165
        $s++;
169
        $s++;
Lines 579-589 sub Z3950SearchAuth { Link Here
579
        while ( $server = $sth->fetchrow_hashref ) {
583
        while ( $server = $sth->fetchrow_hashref ) {
580
            $oConnection[$s] = _create_connection( $server );
584
            $oConnection[$s] = _create_connection( $server );
581
585
582
            $oResult[$s] =
586
            if ( $server->{servertype} eq 'zed' ) {
583
            $server->{servertype} eq 'zed'?
587
                my $server_zquery = $zquery;
584
                $oConnection[$s]->search_pqf( $zquery ):
588
                if ( my $attributes = $server->{attributes} ) {
585
                $oConnection[$s]->search(new ZOOM::Query::CQL(
589
                    $server_zquery = "$attributes $zquery";
586
                    _translate_query( $server, $squery )));
590
                }
591
                $oResult[$s] = $oConnection[$s]->search_pqf( $server_zquery ):
592
            }
593
            else {
594
                $oResult[$s] = $oConnection[$s]->search(
595
                    new ZOOM::Query::CQL(_translate_query( $server, $squery ))
596
                );
597
            }
587
            $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
598
            $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
588
            $servers[$s] = $server;
599
            $servers[$s] = $server;
589
            $s++;
600
            $s++;
(-)a/admin/z3950servers.pl (-1 / +1 lines)
Lines 66-72 if( $op eq 'delete_confirmed' && $id ) { Link Here
66
    $id = 0;
66
    $id = 0;
67
} elsif ( $op eq 'add_validated' ) {
67
} elsif ( $op eq 'add_validated' ) {
68
    my @fields=qw/host port db userid password rank syntax encoding timeout
68
    my @fields=qw/host port db userid password rank syntax encoding timeout
69
        recordtype checked servername servertype sru_options sru_fields
69
        recordtype checked servername servertype sru_options sru_fields attributes
70
        add_xslt/;
70
        add_xslt/;
71
    my $formdata = _form_data_hashref( $input, \@fields );
71
    my $formdata = _form_data_hashref( $input, \@fields );
72
    if( $id ) {
72
    if( $id ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-3 / +8 lines)
Lines 85-90 Link Here
85
        </li>
85
        </li>
86
        <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" />
86
        <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" />
87
        </li>
87
        </li>
88
        [% IF (server.servertype||type) == 'zed' %]
89
        <li><label for="attributes">Attributes (additional PQF attributes added to each query): </label><input type="text" name="attributes" id="attributes" size="30" value="[% server.attributes %]" />
90
        </li>
91
        [% END %]
88
92
89
        <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
93
        <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
90
        <select name="syntax" id="syntax">
94
        <select name="syntax" id="syntax">
Lines 161-167 Link Here
161
        You searched for [% searchfield |html %]
165
        You searched for [% searchfield |html %]
162
    [% END %]
166
    [% END %]
163
    <table id="serverst">
167
    <table id="serverst">
164
        <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Preselected</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>Record type</th><th></th>
168
169
        <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Preselected</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>Record type</th><th>Attributes</th><th>Options</th>
165
        </tr></thead>
170
        </tr></thead>
166
        <tbody>
171
        <tbody>
167
        [% FOREACH loo IN loop %]
172
        [% FOREACH loo IN loop %]
Lines 174-179 Link Here
174
                <span>Authority</span>
179
                <span>Authority</span>
175
                [% END %]
180
                [% END %]
176
            </td>
181
            </td>
182
            <td>[% loo.attributes %]</td>
177
            <td>
183
            <td>
178
                <div class="dropdown">
184
                <div class="dropdown">
179
                    <a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id %]" role="button" data-toggle="dropdown" href="#">
185
                    <a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id %]" role="button" data-toggle="dropdown" href="#">
Lines 253-259 Link Here
253
            $(document).ready(function() {
259
            $(document).ready(function() {
254
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
260
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
255
                    "aoColumnDefs": [
261
                    "aoColumnDefs": [
256
                        { "aTargets": [2,3,4,7,8,9,10,11], "bSortable": false, "bSearchable": false },
262
                        { "aTargets": [-1], "bSortable": false, "bSearchable": false },
257
                    ],
263
                    ],
258
                    "sPaginationType": "four_button"
264
                    "sPaginationType": "four_button"
259
                }));
265
                }));
260
- 

Return to bug 11297