@@ -, +, @@
---
.../bootstrap/en/modules/opac-readingrecord.tt | 6 +++---
opac/opac-readingrecord.pl | 18 +++---------------
2 files changed, 6 insertions(+), 18 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt
@@ -101,7 +101,7 @@
[% END %]
[% END %]
- [% IF GoogleJackets %]
+ [% IF ( Koha.Preference('GoogleJackets') ) %]
[% IF issue.normalized_isbn %]
[% ELSE %]
@@ -109,10 +109,10 @@
[% END %]
[% END %]
- [% IF BakerTaylorEnabled %]
+ [% IF ( Koha.Preference('BakerTaylorEnabled') ) %]
[% bt_id = ( issue.normalized_upc || issue.normalized_isbn ) %]
[% IF ( bt_id ) %]
-
+
[% ELSE %]
No cover image available
[% END %]
--- a/opac/opac-readingrecord.pl
+++ a/opac/opac-readingrecord.pl
@@ -20,19 +20,17 @@ use strict;
use warnings;
use CGI qw ( -utf8 );
-
use C4::Auth;
use C4::Koha;
use C4::Biblio;
use C4::Circulation;
use C4::Members;
-use Koha::DateUtils;
-use MARC::Record;
-
+use C4::External::BakerTaylor qw(&image_url &link_url);
use C4::Output;
use C4::Charset qw(StripNonXmlChars);
-
use Koha::ItemTypes;
+use Koha::DateUtils;
+use MARC::Record;
my $query = new CGI;
@@ -124,20 +122,10 @@ foreach my $issue ( @{$issues} ) {
}
}
-BEGIN {
- if (C4::Context->preference('BakerTaylorEnabled')) {
- require C4::External::BakerTaylor;
- import C4::External::BakerTaylor qw(&image_url &link_url);
- }
-}
-
if (C4::Context->preference('BakerTaylorEnabled')) {
$template->param(
- JacketImages => 1,
- BakerTaylorEnabled => 1,
BakerTaylorImageURL => &image_url(),
BakerTaylorLinkURL => &link_url(),
- BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
);
}
--