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

(-)a/Koha/Illrequest/Config.pm (-1 / +1 lines)
Lines 319-325 sub _load_configuration { Link Here
319
        if ( $reply_date && 'hide' eq $reply_date );
319
        if ( $reply_date && 'hide' eq $reply_date );
320
320
321
    # ILL Partners
321
    # ILL Partners
322
    $configuration->{partner_code} = $xml_config->{partner_code} || 'IL';
322
    $configuration->{partner_code} = C4::Context->preference('ILLPartnerCode') || 'IL';
323
323
324
    return $configuration;
324
    return $configuration;
325
}
325
}
(-)a/about.pl (-4 / +7 lines)
Lines 304-316 if ( C4::Context->preference('ILLModule') ) { Link Here
304
        $warnILLConfiguration = 1;
304
        $warnILLConfiguration = 1;
305
    }
305
    }
306
306
307
    # Check partner_code
307
    # Check ILLPartnerCode sys pref
308
    if ( !Koha::Patron::Categories->find($ill_config->partner_code) ) {
308
    if ( !Koha::Patron::Categories->find( C4::Context->preference('ILLPartnerCode') ) ) {
309
        $template->param( ill_partner_code_doesnt_exist => $ill_config->partner_code );
309
        $template->param( ill_partner_code_doesnt_exist => C4::Context->preference('ILLPartnerCode') );
310
        $warnILLConfiguration = 1;
311
    } elsif ( !Koha::Patrons->search( { categorycode => C4::Context->preference('ILLPartnerCode') } )->count ) {
312
        $template->param( ill_partner_code_no_patrons => C4::Context->preference('ILLPartnerCode') );
310
        $warnILLConfiguration = 1;
313
        $warnILLConfiguration = 1;
311
    }
314
    }
312
315
313
    if ( !$ill_config_from_file->{partner_code} ) {
316
    if ( !C4::Context->preference('ILLPartnerCode') ) {
314
        # partner code not defined
317
        # partner code not defined
315
        $template->param( ill_partner_code_not_defined => 1 );
318
        $template->param( ill_partner_code_not_defined => 1 );
316
        $warnILLConfiguration = 1;
319
        $warnILLConfiguration = 1;
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 291-296 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
291
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
291
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
292
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
292
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
293
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
293
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
294
('ILLPartnerCode','IL','','Patrons from this patron category will be used as partners to place ILL requests with','free'),
294
('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'),
295
('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'),
295
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
296
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
296
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
297
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-2 / +10 lines)
Lines 504-510 Link Here
504
                                            <tr>
504
                                            <tr>
505
                                                <th scope="row"><strong>Warning</strong> </th>
505
                                                <th scope="row"><strong>Warning</strong> </th>
506
                                                <td>
506
                                                <td>
507
                                                    The ILL module is enabled, but no 'partner_code' defined in koha-conf.xml. Falling back to the hardcoded 'IL'.
507
                                                    The ILL module is enabled, but ILLPartnerCode system preference is empty. Falling back to the hardcoded 'IL'.
508
                                                </td>
509
                                            </tr>
510
                                        [% END %]
511
                                        [% IF ill_partner_code_no_patrons %]
512
                                            <tr>
513
                                                <th scope="row"><strong>Warning</strong> </th>
514
                                                <td>
515
                                                    The ILL module is enabled and ILLPartnerCode system preference configured, but there are no patrons in [% ill_partner_code_no_patrons | html %] category.
508
                                                </td>
516
                                                </td>
509
                                            </tr>
517
                                            </tr>
510
                                        [% END %]
518
                                        [% END %]
Lines 520-526 Link Here
520
                                            <tr>
528
                                            <tr>
521
                                                <th scope="row"><strong>Warning</strong> </th>
529
                                                <th scope="row"><strong>Warning</strong> </th>
522
                                                <td>
530
                                                <td>
523
                                                    The ILL module is enabled, but the configured 'partner_code' ([% ill_partner_code_doesnt_exist | html %]) is not defined on the system.
531
                                                    The ILL module is enabled, but the configured ILLPartnerCode ([% ill_partner_code_doesnt_exist | html %]) is not defined on the system.
524
                                                </td>
532
                                                </td>
525
                                            </tr>
533
                                            </tr>
526
                                        [% END %]
534
                                        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/interlibrary_loans.pref (-1 / +5 lines)
Lines 44-49 Interlibrary loans: Link Here
44
            - pref: ILLSendStaffNotices
44
            - pref: ILLSendStaffNotices
45
              class: multi
45
              class: multi
46
            - "(separated with |). e.g. ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED If left empty, no staff ILL notices will be sent."
46
            - "(separated with |). e.g. ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED If left empty, no staff ILL notices will be sent."
47
        -
48
            - "Use patrons from category"
49
            - pref: ILLPartnerCode
50
              choices: patron-categories
51
            - "as partners to place ILL requests with."
47
        -
52
        -
48
            - "Fallback email address for staff ILL notices to be sent to in the absence of a library address:"
53
            - "Fallback email address for staff ILL notices to be sent to in the absence of a library address:"
49
            - pref: ILLDefaultStaffEmail
54
            - pref: ILLDefaultStaffEmail
50
- 

Return to bug 32911