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

(-)a/admin/edi_accounts.pl (-4 / +17 lines)
Lines 20-25 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI;
23
use JSON qw( decode_json );
23
24
24
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
Lines 111-122 if ( $op eq 'acct_form' ) { Link Here
111
    # we do a default display after deletes and saves
112
    # we do a default display after deletes and saves
112
    # as well as when that's all you want
113
    # as well as when that's all you want
113
    $template->param( display => 1 );
114
    $template->param( display => 1 );
114
    my @ediaccounts = $schema->resultset('VendorEdiAccount')->search(
115
    my $ediaccounts = $schema->resultset('VendorEdiAccount')->search(
115
        {},
116
        {},
116
        {
117
        { prefetch => [ 'vendor', 'file_transport' ] }
117
            join => 'vendor',
118
        }
119
    );
118
    );
119
120
    # Decode file_transport status for each account
121
    my @ediaccounts;
122
    while ( my $ediaccount = $ediaccounts->next ) {
123
        my $unblessed = { $ediaccount->get_inflated_columns };
124
        $unblessed->{vendor} = { $ediaccount->vendor->get_inflated_columns };
125
        if ( $ediaccount->file_transport ) {
126
            $unblessed->{file_transport} = { $ediaccount->file_transport->get_inflated_columns };
127
            $unblessed->{file_transport}->{status} =
128
                $ediaccount->file_transport->status ? decode_json( $ediaccount->file_transport->status ) : undef;
129
        }
130
        push @ediaccounts, $unblessed;
131
    }
132
120
    $template->param( ediaccounts => \@ediaccounts );
133
    $template->param( ediaccounts => \@ediaccounts );
121
}
134
}
122
135
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt (-17 / +19 lines)
Lines 269-282 Link Here
269
                            <th>ID</th>
269
                            <th>ID</th>
270
                            <th>Vendor</th>
270
                            <th>Vendor</th>
271
                            <th>Description</th>
271
                            <th>Description</th>
272
                            <th>Transport</th>
272
                            <th>File transport</th>
273
                            <th>Remote host</th>
274
                            <th>Username</th>
275
                            <th>Password</th>
276
                            <th>Upload port</th>
277
                            <th>Download port</th>
278
                            <th>Download directory</th>
279
                            <th>Upload directory</th>
280
                            <th>Qualifier</th>
273
                            <th>Qualifier</th>
281
                            <th>SAN</th>
274
                            <th>SAN</th>
282
                            <th>Standard</th>
275
                            <th>Standard</th>
Lines 294-307 Link Here
294
                                <td>[% account.id | html %]</td>
287
                                <td>[% account.id | html %]</td>
295
                                <td><a href="/cgi-bin/koha/acquisition/vendors/[% account.vendor_id | uri %]">[% account.vendor.name | html %]</a></td>
288
                                <td><a href="/cgi-bin/koha/acquisition/vendors/[% account.vendor_id | uri %]">[% account.vendor.name | html %]</a></td>
296
                                <td>[% account.description | html %]</td>
289
                                <td>[% account.description | html %]</td>
297
                                <td>[% account.transport | html %]</td>
290
                                <td>
298
                                <td>[% account.host | html %]</td>
291
                                    [% IF account.file_transport %]
299
                                <td>[% account.username | html %]</td>
292
                                        [% account.file_transport.name | html %]
300
                                <td>[% IF account.password %]*****[% END %]</td>
293
                                        [% IF account.file_transport.status %]
301
                                <td>[% account.upload_port | html %]</td>
294
                                            [% IF account.file_transport.status.status == "ok" %]
302
                                <td>[% account.download_port | html %]</td>
295
                                                (<i class="text-success fa-solid fa-circle-check"></i> <span class="text-success">Tests passing</span>)
303
                                <td>[% account.download_directory | html %]</td>
296
                                            [% ELSIF account.file_transport.status.status == "errors" %]
304
                                <td>[% account.upload_directory | html %]</td>
297
                                                (<i class="text-danger fa-solid fa-circle-xmark"></i> <span class="text-danger">Errors detected</span>)
298
                                            [% ELSE %]
299
                                                (<em>Never used</em>)
300
                                            [% END %]
301
                                        [% ELSE %]
302
                                            (<em>Never used</em>)
303
                                        [% END %]
304
                                    [% ELSE %]
305
                                        <span class="text-danger">No transport configured</span>
306
                                    [% END %]
307
                                </td>
305
                                <td>
308
                                <td>
306
                                    [% FOREACH qualifier IN code_qualifiers %]
309
                                    [% FOREACH qualifier IN code_qualifiers %]
307
                                        [% IF qualifier.code == account.id_code_qualifier %]
310
                                        [% IF qualifier.code == account.id_code_qualifier %]
308
- 

Return to bug 38489