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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-2 / +13 lines)
Lines 352-361 Link Here
352
                                                            [% END %]
352
                                                            [% END %]
353
353
354
                                                        </a> <!-- / .p1 -->
354
                                                        </a> <!-- / .p1 -->
355
                                                        [% IF ( BakerTaylorEnabled ) %]
355
                                                        [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
356
                                                            [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
356
                                                            [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
357
                                                            [% IF ( bt_id ) %]
357
                                                            [% IF ( bt_id ) %]
358
                                                                <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
358
                                                                <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
359
                                                            [% ELSE %]
360
                                                                <span class="no-image">No cover image available</span>
361
                                                            [% END %]
362
                                                        [% END %]
363
364
                                                        [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
365
                                                            [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
366
                                                            [% IF ( bt_id ) %]
367
                                                                <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
368
                                                                    <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
369
                                                                </a>
359
                                                            [% ELSE %]
370
                                                            [% ELSE %]
360
                                                                <span class="no-image">No cover image available</span>
371
                                                                <span class="no-image">No cover image available</span>
361
                                                            [% END %]
372
                                                            [% END %]
(-)a/opac/opac-shelves.pl (-1 / +14 lines)
Lines 40-45 use Koha::RecordProcessor; Link Here
40
40
41
use constant ANYONE => 2;
41
use constant ANYONE => 2;
42
42
43
BEGIN {
44
    if (C4::Context->preference('BakerTaylorEnabled')) {
45
        require C4::External::BakerTaylor;
46
        import C4::External::BakerTaylor qw(&image_url &link_url);
47
    }
48
}
49
43
my $query = new CGI;
50
my $query = new CGI;
44
51
45
my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt";
52
my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt";
Lines 57-62 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ Link Here
57
        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
64
        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
58
    });
65
    });
59
66
67
if (C4::Context->preference("BakerTaylorEnabled")) {
68
    $template->param(
69
        BakerTaylorImageURL => &image_url(),
70
        BakerTaylorLinkURL  => &link_url(),
71
    );
72
}
73
60
my $op       = $query->param('op')       || 'list';
74
my $op       = $query->param('op')       || 'list';
61
my $referer  = $query->param('referer')  || $op;
75
my $referer  = $query->param('referer')  || $op;
62
my $category = $query->param('category') || 1;
76
my $category = $query->param('category') || 1;
63
- 

Return to bug 23482