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

(-)a/about.pl (-1 / +19 lines)
Lines 35-40 use C4::Installer; Link Here
35
35
36
use Koha;
36
use Koha;
37
use Koha::Acquisition::Currencies;
37
use Koha::Acquisition::Currencies;
38
use Koha::Patron::Categories;
38
use Koha::Patrons;
39
use Koha::Patrons;
39
use Koha::Caches;
40
use Koha::Caches;
40
use Koha::Config::SysPrefs;
41
use Koha::Config::SysPrefs;
Lines 261-276 if ( !defined C4::Context->config('use_zebra_facets') ) { Link Here
261
    }
262
    }
262
}
263
}
263
264
265
# ILL module checks
264
if ( C4::Context->preference('ILLModule') ) {
266
if ( C4::Context->preference('ILLModule') ) {
265
    my $warnILLConfiguration = 0;
267
    my $warnILLConfiguration = 0;
268
    my $ill_config_from_file = C4::Context->config("interlibrary_loans");
269
    my $ill_config = Koha::Illrequest::Config->new;
270
266
    my $available_ill_backends =
271
    my $available_ill_backends =
267
      ( scalar @{ Koha::Illrequest::Config->new->available_backends } > 0 );
272
      ( scalar @{ $ill_config->available_backends } > 0 );
268
273
274
    # Check backends
269
    if ( !$available_ill_backends ) {
275
    if ( !$available_ill_backends ) {
270
        $template->param( no_ill_backends => 1 );
276
        $template->param( no_ill_backends => 1 );
271
        $warnILLConfiguration = 1;
277
        $warnILLConfiguration = 1;
272
    }
278
    }
273
279
280
    # Check partner_code
281
    if ( !Koha::Patron::Categories->find($ill_config->partner_code) ) {
282
        $template->param( ill_partner_code_doesnt_exist => $ill_config->partner_code );
283
        $warnILLConfiguration = 1;
284
    }
285
286
    if ( !$ill_config_from_file->{partner_code} ) {
287
        # partner code not defined
288
        $template->param( ill_partner_code_not_defined => 1 );
289
        $warnILLConfiguration = 1;
290
    }
291
274
    $template->param( warnILLConfiguration => $warnILLConfiguration );
292
    $template->param( warnILLConfiguration => $warnILLConfiguration );
275
}
293
}
276
294
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-2 / +13 lines)
Lines 227-235 Link Here
227
                    </td></tr>
227
                    </td></tr>
228
                [% END %]
228
                [% END %]
229
                [% IF warnILLConfiguration %]
229
                [% IF warnILLConfiguration %]
230
                  [% IF no_ill_backends %]
230
                    <tr><th scope="row"><b>Warning</b> </th><td>
231
                    <tr><th scope="row"><b>Warning</b> </th><td>
231
                    [% IF no_ill_backends %]The ILL module is enabled, but there are no backends available.[%END %]
232
                    The ILL module is enabled, but there are no backends available.
232
                    </td></tr>
233
                    </td></tr>
234
                  [% END %]
235
                  [% IF ill_partner_code_not_defined %]
236
                    <tr><th scope="row"><b>Warning</b> </th><td>
237
                    The ILL module is enabled, but no 'partner_code' defined in koha-conf.xml. Falling back to the hardcoded 'ILLLIBS'.
238
                    </td></tr>
239
                  [%END %]
240
                  [% IF ill_partner_code_doesnt_exist %]
241
                    <tr><th scope="row"><b>Warning</b> </th><td>
242
                    The ILL module is enabled, but the configured 'partner_code' ([% ill_partner_code_doesnt_exist %]) is not defined on the system.
243
                    </td></tr>
244
                  [% END %]
233
                [% END %]
245
                [% END %]
234
            </table>
246
            </table>
235
        [% END %]
247
        [% END %]
236
- 

Return to bug 7317