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

(-)a/installer/data/mysql/atomicupdate/bug_35604.pl (-2 / +2 lines)
Lines 3-15 use Koha::Installer::Output qw(say_warning say_success say_info); Link Here
3
3
4
return {
4
return {
5
    bug_number  => "35604",
5
    bug_number  => "35604",
6
    description => "Add new AutoILLBackendPriority system preferences",
6
    description => "Add new AutoILLBackendPriority system preference",
7
    up          => sub {
7
    up          => sub {
8
        my ($args) = @_;
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
10
11
        $dbh->do(
11
        $dbh->do(
12
            q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ILLBackends'); }
12
            q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ill-backends'); }
13
        );
13
        );
14
        say_success( $out, "Added new system preference 'AutoILLBackendPriority'" );
14
        say_success( $out, "Added new system preference 'AutoILLBackendPriority'" );
15
    },
15
    },
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 93-99 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
93
('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'),
93
('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'),
94
('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'),
94
('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'),
95
('AutoEmailNewUser','0',NULL,'Send an email to newly created patrons.','YesNo'),
95
('AutoEmailNewUser','0',NULL,'Send an email to newly created patrons.','YesNo'),
96
('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ILLBackends'),
96
('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ill-backends'),
97
('AutoLinkBiblios','0',NULL,'If enabled, link biblio to authorities on creation and edit','YesNo'),
97
('AutoLinkBiblios','0',NULL,'If enabled, link biblio to authorities on creation and edit','YesNo'),
98
('AutomaticCheckinAutoFill','0',NULL,'Automatically fill the next hold with an automatic check in.','YesNo'),
98
('AutomaticCheckinAutoFill','0',NULL,'Automatically fill the next hold with an automatic check in.','YesNo'),
99
('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo'),
99
('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js (-7 / +3 lines)
Lines 34-40 $(document).ready(function () { Link Here
34
                        __("Verification timed out.")
34
                        __("Verification timed out.")
35
                    );
35
                    );
36
                } else {
36
                } else {
37
                    let message = "Error";
37
                    let message = __("Error");
38
                    if (request.hasOwnProperty("responseJSON")) {
38
                    if (request.hasOwnProperty("responseJSON")) {
39
                        if (request.responseJSON.error) {
39
                        if (request.responseJSON.error) {
40
                            message = request.responseJSON.error;
40
                            message = request.responseJSON.error;
Lines 61-72 $(document).ready(function () { Link Here
61
    function getBackendsAvailability(auto_backends, metadata) {
61
    function getBackendsAvailability(auto_backends, metadata) {
62
        let promises = [];
62
        let promises = [];
63
        for (const auto_backend of auto_backends) {
63
        for (const auto_backend of auto_backends) {
64
            try {
64
            const prom = getBackendAvailability(auto_backend, metadata);
65
                const prom = getBackendAvailability(auto_backend, metadata);
65
            promises.push(prom);
66
                promises.push(prom);
67
            } catch (e) {
68
                console.log(e);
69
            }
70
        }
66
        }
71
        Promise.allSettled(promises).then(() => {
67
        Promise.allSettled(promises).then(() => {
72
            let auto_backend = auto_backends.find(backend => backend.available);
68
            let auto_backend = auto_backends.find(backend => backend.available);
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-2 / +2 lines)
Lines 445-453 Link Here
445
                                [% END %]
445
                                [% END %]
446
                                [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
446
                                [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
447
                                    [% IF Koha.Preference( 'AutoILLBackendPriority' ) %]
447
                                    [% IF Koha.Preference( 'AutoILLBackendPriority' ) %]
448
                                        <li>Make an automatic <a href="/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard">Interlibrary loan request</a></li>
448
                                        <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create&amp;backend=Standard">interlibrary loan request</a></li>
449
                                    [% ELSE %]
449
                                    [% ELSE %]
450
                                        <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
450
                                        <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">interlibrary loan request</a></li>
451
                                    [% END %]
451
                                    [% END %]
452
                                [% END %]
452
                                [% END %]
453
                            </ul>
453
                            </ul>
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/ill-autobackend.js (-7 / +3 lines)
Lines 34-40 $(document).ready(function () { Link Here
34
                        __("Verification timed out.")
34
                        __("Verification timed out.")
35
                    );
35
                    );
36
                } else {
36
                } else {
37
                    let message = "Error";
37
                    let message = __("Error");
38
                    if (request.hasOwnProperty("responseJSON")) {
38
                    if (request.hasOwnProperty("responseJSON")) {
39
                        if (request.responseJSON.error) {
39
                        if (request.responseJSON.error) {
40
                            message = request.responseJSON.error;
40
                            message = request.responseJSON.error;
Lines 61-72 $(document).ready(function () { Link Here
61
    function getBackendsAvailability(auto_backends, metadata) {
61
    function getBackendsAvailability(auto_backends, metadata) {
62
        let promises = [];
62
        let promises = [];
63
        for (const auto_backend of auto_backends) {
63
        for (const auto_backend of auto_backends) {
64
            try {
64
            const prom = getBackendAvailability(auto_backend, metadata);
65
                const prom = getBackendAvailability(auto_backend, metadata);
65
            promises.push(prom);
66
                promises.push(prom);
67
            } catch (e) {
68
                console.log(e);
69
            }
70
        }
66
        }
71
        Promise.allSettled(promises).then(() => {
67
        Promise.allSettled(promises).then(() => {
72
            let auto_backend = auto_backends.find(backend => backend.available);
68
            let auto_backend = auto_backends.find(backend => backend.available);

Return to bug 35604