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

(-)a/C4/Breeding.pm (-6 / +17 lines)
Lines 157-166 sub Z3950Search { Link Here
157
    );
157
    );
158
    my @servers = $rs->all;
158
    my @servers = $rs->all;
159
    foreach my $server ( @servers ) {
159
    foreach my $server ( @servers ) {
160
        my $server_zquery = $zquery;
161
        if(my $attributes = $server->{attributes}){
162
            $server_zquery = "$attributes $zquery";
163
        }
160
        $oConnection[$s] = _create_connection( $server );
164
        $oConnection[$s] = _create_connection( $server );
161
        $oResult[$s] =
165
        $oResult[$s] =
162
            $server->{servertype} eq 'zed'?
166
            $server->{servertype} eq 'zed'?
163
                $oConnection[$s]->search_pqf( $zquery ):
167
                $oConnection[$s]->search_pqf( $server_zquery ):
164
                $oConnection[$s]->search(new ZOOM::Query::CQL(
168
                $oConnection[$s]->search(new ZOOM::Query::CQL(
165
                    _translate_query( $server, $squery )));
169
                    _translate_query( $server, $squery )));
166
        $s++;
170
        $s++;
Lines 614-624 sub Z3950SearchAuth { Link Here
614
        while ( $server = $sth->fetchrow_hashref ) {
618
        while ( $server = $sth->fetchrow_hashref ) {
615
            $oConnection[$s] = _create_connection( $server );
619
            $oConnection[$s] = _create_connection( $server );
616
620
617
            $oResult[$s] =
621
            if ( $server->{servertype} eq 'zed' ) {
618
            $server->{servertype} eq 'zed'?
622
                my $server_zquery = $zquery;
619
                $oConnection[$s]->search_pqf( $zquery ):
623
                if ( my $attributes = $server->{attributes} ) {
620
                $oConnection[$s]->search(new ZOOM::Query::CQL(
624
                    $server_zquery = "$attributes $zquery";
621
                    _translate_query( $server, $squery )));
625
                }
626
                $oResult[$s] = $oConnection[$s]->search_pqf( $server_zquery );
627
            }
628
            else {
629
                $oResult[$s] = $oConnection[$s]->search(
630
                    new ZOOM::Query::CQL(_translate_query( $server, $squery ))
631
                );
632
            }
622
            $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
633
            $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
623
            $servers[$s] = $server;
634
            $servers[$s] = $server;
624
            $s++;
635
            $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 86-91 Link Here
86
        </li>
86
        </li>
87
        <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank | html %]" />
87
        <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank | html %]" />
88
        </li>
88
        </li>
89
        [% IF (server.servertype||type) == 'zed' %]
90
        <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 %]" />
91
        </li>
92
        [% END %]
89
93
90
        <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
94
        <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
91
        <select name="syntax" id="syntax">
95
        <select name="syntax" id="syntax">
Lines 162-168 Link Here
162
        You searched for [% searchfield | html %]
166
        You searched for [% searchfield | html %]
163
    [% END %]
167
    [% END %]
164
    <table id="serverst">
168
    <table id="serverst">
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></th>
169
170
        <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>
166
        </tr></thead>
171
        </tr></thead>
167
        <tbody>
172
        <tbody>
168
        [% FOREACH loo IN loop %]
173
        [% FOREACH loo IN loop %]
Lines 175-180 Link Here
175
                <span>Authority</span>
180
                <span>Authority</span>
176
                [% END %]
181
                [% END %]
177
            </td>
182
            </td>
183
            <td>[% loo.attributes %]</td>
178
            <td>
184
            <td>
179
                <div class="dropdown">
185
                <div class="dropdown">
180
                    <a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id | html %]" role="button" data-toggle="dropdown" href="#">
186
                    <a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id | html %]" role="button" data-toggle="dropdown" href="#">
Lines 257-263 Link Here
257
            $(document).ready(function() {
263
            $(document).ready(function() {
258
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
264
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
259
                    "aoColumnDefs": [
265
                    "aoColumnDefs": [
260
                        { "aTargets": [2,3,4,7,8,9,10,11], "bSortable": false, "bSearchable": false },
266
                        { "aTargets": [-1], "bSortable": false, "bSearchable": false },
261
                    ],
267
                    ],
262
                    "sPaginationType": "four_button"
268
                    "sPaginationType": "four_button"
263
                }));
269
                }));
264
- 

Return to bug 11297