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

(-)a/C4/Breeding.pm (-7 / +18 lines)
Lines 151-160 sub Z3950Search { Link Here
151
    );
151
    );
152
    my @servers = $rs->all;
152
    my @servers = $rs->all;
153
    foreach my $server ( @servers ) {
153
    foreach my $server ( @servers ) {
154
        my $server_zquery = $zquery;
155
        if(my $attributes = $server->{attributes}){
156
            $server_zquery = "$attributes $zquery";
157
        }
154
        $oConnection[$s] = _create_connection( $server );
158
        $oConnection[$s] = _create_connection( $server );
155
        $oResult[$s] =
159
        $oResult[$s] =
156
            $server->{servertype} eq 'zed'?
160
            $server->{servertype} eq 'zed'?
157
                $oConnection[$s]->search_pqf( $zquery ):
161
                $oConnection[$s]->search_pqf( $server_zquery ):
158
                $oConnection[$s]->search(new ZOOM::Query::CQL(
162
                $oConnection[$s]->search(new ZOOM::Query::CQL(
159
                    _translate_query( $server, $squery )));
163
                    _translate_query( $server, $squery )));
160
        $s++;
164
        $s++;
Lines 553-564 sub Z3950SearchAuth { Link Here
553
        while ( my $server = $sth->fetchrow_hashref ) {
557
        while ( my $server = $sth->fetchrow_hashref ) {
554
            $oConnection[$s] = _create_connection( $server );
558
            $oConnection[$s] = _create_connection( $server );
555
559
556
            $oResult[$s] =
560
            if ( $server->{servertype} eq 'zed' ) {
557
            $server->{servertype} eq 'zed'?
561
                my $server_zquery = $zquery;
558
                $oConnection[$s]->search_pqf( $zquery ):
562
                if ( my $attributes = $server->{attributes} ) {
559
                $oConnection[$s]->search(new ZOOM::Query::CQL(
563
                    $server_zquery = "$attributes $zquery";
560
                    _translate_query( $server, $squery )));
564
                }
561
            $encoding[$s]   = $server->{encoding} // "iso-5426";
565
                $oResult[$s] = $oConnection[$s]->search_pqf( $server_zquery );
566
            }
567
            else {
568
                $oResult[$s] = $oConnection[$s]->search(
569
                    new ZOOM::Query::CQL(_translate_query( $server, $squery ))
570
                );
571
            }
572
            $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
562
            $servers[$s] = $server;
573
            $servers[$s] = $server;
563
            $s++;
574
            $s++;
564
        }   ## while fetch
575
        }   ## while fetch
(-)a/admin/z3950servers.pl (-1 / +1 lines)
Lines 67-73 if( $op eq 'delete_confirmed' && $id ) { Link Here
67
    $id = 0;
67
    $id = 0;
68
} elsif ( $op eq 'add_validated' ) {
68
} elsif ( $op eq 'add_validated' ) {
69
    my @fields=qw/host port db userid password rank syntax encoding timeout
69
    my @fields=qw/host port db userid password rank syntax encoding timeout
70
        recordtype checked servername servertype sru_options sru_fields
70
        recordtype checked servername servertype sru_options sru_fields attributes
71
        add_xslt/;
71
        add_xslt/;
72
    my $formdata = _form_data_hashref( $input, \@fields );
72
    my $formdata = _form_data_hashref( $input, \@fields );
73
    if( $id ) {
73
    if( $id ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-3 / +8 lines)
Lines 81-86 Link Here
81
        </li>
81
        </li>
82
        <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank | html %]" />
82
        <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank | html %]" />
83
        </li>
83
        </li>
84
        [% IF (server.servertype||type) == 'zed' %]
85
        <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 %]" />
86
        </li>
87
        [% END %]
84
88
85
        <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
89
        <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
86
        <select name="syntax" id="syntax">
90
        <select name="syntax" id="syntax">
Lines 157-163 Link Here
157
        You searched for [% searchfield | html %]
161
        You searched for [% searchfield | html %]
158
    [% END %]
162
    [% END %]
159
    <table id="serverst">
163
    <table id="serverst">
160
        <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>
164
165
        <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>
161
        </tr></thead>
166
        </tr></thead>
162
        <tbody>
167
        <tbody>
163
        [% FOREACH loo IN loop %]
168
        [% FOREACH loo IN loop %]
Lines 170-175 Link Here
170
                <span>Authority</span>
175
                <span>Authority</span>
171
                [% END %]
176
                [% END %]
172
            </td>
177
            </td>
178
            <td>[% loo.attributes %]</td>
173
            <td>
179
            <td>
174
                <div class="dropdown">
180
                <div class="dropdown">
175
                    <a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id | html %]" role="button" data-toggle="dropdown" href="#">
181
                    <a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id | html %]" role="button" data-toggle="dropdown" href="#">
Lines 252-258 Link Here
252
            $(document).ready(function() {
258
            $(document).ready(function() {
253
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
259
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
254
                    "aoColumnDefs": [
260
                    "aoColumnDefs": [
255
                        { "aTargets": [2,3,4,7,8,9,10,11], "bSortable": false, "bSearchable": false },
261
                        { "aTargets": [-1], "bSortable": false, "bSearchable": false },
256
                    ],
262
                    ],
257
                    "sPaginationType": "full"
263
                    "sPaginationType": "full"
258
                }));
264
                }));
259
- 

Return to bug 11297