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

(-)a/C4/UsageStats.pm (+1 lines)
Lines 248-253 sub _shared_preferences { Link Here
248
        OPACAmazonCoverImages
248
        OPACAmazonCoverImages
249
        Babeltheque
249
        Babeltheque
250
        BakerTaylorEnabled
250
        BakerTaylorEnabled
251
        OPACBakerTaylorEnabled
251
        GoogleJackets
252
        GoogleJackets
252
        HTML5MediaEnabled
253
        HTML5MediaEnabled
253
        LibraryThingForLibrariesEnabled
254
        LibraryThingForLibrariesEnabled
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 464-469 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
464
('OPACAmazonCoverImages','0','','Display cover images on OPAC from Amazon Web Services','YesNo'),
464
('OPACAmazonCoverImages','0','','Display cover images on OPAC from Amazon Web Services','YesNo'),
465
('OPACAuthorIdentifiersAndInformation', '', '', 'Display author information on the OPAC detail page','multiple_sortable'),
465
('OPACAuthorIdentifiersAndInformation', '', '', 'Display author information on the OPAC detail page','multiple_sortable'),
466
('OpacAuthorities','1',NULL,'If ON, enables the search authorities link on OPAC','YesNo'),
466
('OpacAuthorities','1',NULL,'If ON, enables the search authorities link on OPAC','YesNo'),
467
('OPACBakerTaylorEnabled','0','','Enable or disable all Baker & Taylor features in the OPAC.','YesNo'),
467
('OPACBaseURL','',NULL,'Specify the Base URL of the OPAC, e.g., http://opac.mylibrary.com, including the protocol (http:// or https://). Otherwise, the http:// will be added automatically by Koha upon saving.','Free'),
468
('OPACBaseURL','',NULL,'Specify the Base URL of the OPAC, e.g., http://opac.mylibrary.com, including the protocol (http:// or https://). Otherwise, the http:// will be added automatically by Koha upon saving.','Free'),
468
('opacbookbag','1','','If ON, enables display of Cart feature','YesNo'),
469
('opacbookbag','1','','If ON, enables display of Cart feature','YesNo'),
469
('OpacBrowser','0',NULL,'If ON, enables subject authorities browser on OPAC (needs to set misc/cronjob/sbuild_browser_and_cloud.pl)','YesNo'),
470
('OpacBrowser','0',NULL,'If ON, enables subject authorities browser on OPAC (needs to set misc/cronjob/sbuild_browser_and_cloud.pl)','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-4 / +6 lines)
Lines 46-51 Link Here
46
[% CoceHost        = Koha.Preference('CoceHost') %]
46
[% CoceHost        = Koha.Preference('CoceHost') %]
47
[% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
47
[% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
48
[% SyndeticsCoverImageSize = Koha.Preference('SyndeticsCoverImageSize') %]
48
[% SyndeticsCoverImageSize = Koha.Preference('SyndeticsCoverImageSize') %]
49
[% CustomCoverImages = ( Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') ) %]
50
[% BakerTaylorEnabled = Koha.Preference('BakerTaylorEnabled') %]
49
51
50
[% WRAPPER 'sub-header.inc' %]
52
[% WRAPPER 'sub-header.inc' %]
51
    [% WRAPPER breadcrumbs %]
53
    [% WRAPPER breadcrumbs %]
Lines 465-471 Link Here
465
                                <table>
467
                                <table>
466
                                    <thead>
468
                                    <thead>
467
                                    <tr>
469
                                    <tr>
468
                                        [% IF ( CoverImagePlugins || AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || Koha.Preference('BakerTaylorEnabled') || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
470
                                        [% IF ( CoverImagePlugins || AmazonCoverImages  || LocalCoverImages || IntranetCoce || SyndeticsCovers || BakerTaylorEnabled || CustomCoverImages ) %]
469
                                            <th>&nbsp;</th>
471
                                            <th>&nbsp;</th>
470
                                        [% END %]
472
                                        [% END %]
471
                                        <th colspan="2">Results</th>
473
                                        <th colspan="2">Results</th>
Lines 477-483 Link Here
477
                                    <tbody>
479
                                    <tbody>
478
                                    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
480
                                    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
479
                                        <tr id="row[% SEARCH_RESULT.biblionumber | html %]">
481
                                        <tr id="row[% SEARCH_RESULT.biblionumber | html %]">
480
                                            [% IF ( CoverImagePlugins || AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || Koha.Preference('BakerTaylorEnabled') || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
482
                                            [% IF ( CoverImagePlugins || AmazonCoverImages  || LocalCoverImages || IntranetCoce || SyndeticsCovers || BakerTaylorEnabled || CustomCoverImages ) %]
481
    <td class="bookcoverimg">
483
    <td class="bookcoverimg">
482
        <div id="cover-slides-[% SEARCH_RESULT.biblionumber | html %]" class="cover-slides" data-biblionumber="[% SEARCH_RESULT.biblionumber | html %]" data-isbn="[% To.json(SEARCH_RESULT.normalized_isbn) | $raw %]" data-processedbiblio="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber | $raw %]">
484
        <div id="cover-slides-[% SEARCH_RESULT.biblionumber | html %]" class="cover-slides" data-biblionumber="[% SEARCH_RESULT.biblionumber | html %]" data-isbn="[% To.json(SEARCH_RESULT.normalized_isbn) | $raw %]" data-processedbiblio="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber | $raw %]">
483
            [% IF ( LocalCoverImages && SEARCH_RESULT.has_local_cover_image ) %]
485
            [% IF ( LocalCoverImages && SEARCH_RESULT.has_local_cover_image ) %]
Lines 522-528 Link Here
522
            [% END %]
524
            [% END %]
523
525
524
            [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
526
            [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
525
            [% IF ( Koha.Preference('BakerTaylorEnabled') && bt_id ) %]
527
            [% IF ( BakerTaylorEnabled && bt_id ) %]
526
                [% SET BakerTaylorImageURL = "https://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=${ Koha.Preference('BakerTaylorUsername') }&Password=${ Koha.Preference('BakerTaylorPassword') }&Options=Y&Return=T&Type=S&Value=$bt_id" %]
528
                [% SET BakerTaylorImageURL = "https://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=${ Koha.Preference('BakerTaylorUsername') }&Password=${ Koha.Preference('BakerTaylorPassword') }&Options=Y&Return=T&Type=S&Value=$bt_id" %]
527
                <div class="cover-image bakertaylor-coverimg" id="bakertaylor-coverimg">
529
                <div class="cover-image bakertaylor-coverimg" id="bakertaylor-coverimg">
528
                    [% IF BakerTaylorBookstoreURL %]
530
                    [% IF BakerTaylorBookstoreURL %]
Lines 538-544 Link Here
538
                </div>
540
                </div>
539
            [% END %]
541
            [% END %]
540
542
541
            [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
543
            [% IF CustomCoverImages %]
542
                [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
544
                [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
543
                [% IF custom_cover_image_url %]
545
                [% IF custom_cover_image_url %]
544
                    <div id="custom-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image custom-coverimg">
546
                    <div id="custom-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image custom-coverimg">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-1 / +1 lines)
Lines 214-220 Link Here
214
    [% Asset.js("js/localcovers.js") | $raw %]
214
    [% Asset.js("js/localcovers.js") | $raw %]
215
[% END %]
215
[% END %]
216
216
217
[% IF ( BakerTaylorEnabled ) %]
217
[% IF ( OPACBakerTaylorEnabled ) %]
218
    [% Asset.js("js/bakertaylorimages.js") | $raw %]
218
    [% Asset.js("js/bakertaylorimages.js") | $raw %]
219
    <script>
219
    <script>
220
        $(window).load(function(){
220
        $(window).load(function(){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc (-8 / +6 lines)
Lines 28-34 Link Here
28
                                [% img_title = item.biblionumber %]
28
                                [% img_title = item.biblionumber %]
29
                            [% END %]
29
                            [% END %]
30
30
31
                            [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || BakerTaylorEnabled || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) ) %]
31
                            [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || Koha.Preference('OPACBakerTaylorEnabled') || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) ) %]
32
                                <a class="shelfbrowser_cover" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser">
32
                                <a class="shelfbrowser_cover" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser">
33
                                    [% IF ( OPACLocalCoverImages ) %]
33
                                    [% IF ( OPACLocalCoverImages ) %]
34
                                        <div title="[% img_title | html %]" class="[% item.biblionumber | html %] thumbnail-shelfbrowser" id="local-thumbnail-shelf-[% item.biblionumber | html %]"></div>
34
                                        <div title="[% img_title | html %]" class="[% item.biblionumber | html %] thumbnail-shelfbrowser" id="local-thumbnail-shelf-[% item.biblionumber | html %]"></div>
Lines 62-75 Link Here
62
                                    [% coce_id = item.browser_normalized_ean || item.browser_normalized_isbn | html %]
62
                                    [% coce_id = item.browser_normalized_ean || item.browser_normalized_isbn | html %]
63
                                    <div title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail-preview-[% coce_id | html %]"></div>
63
                                    <div title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail-preview-[% coce_id | html %]"></div>
64
                                    [% END %]
64
                                    [% END %]
65
                                    [% IF ( BakerTaylorEnabled ) %]
65
66
                                        [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) | html %]
66
                                    [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) %]
67
                                        [% IF ( bt_id ) %]
67
                                    [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
68
                                            <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
68
                                        <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
69
                                        [% ELSE %]
70
                                            <span class="no-image">No cover image available</span>
71
                                        [% END %]
72
                                    [% END %]
69
                                    [% END %]
70
73
                                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
71
                                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
74
                                        [% SET custom_cover_image_url = item.biblio_object.custom_cover_image_url %]
72
                                        [% SET custom_cover_image_url = item.biblio_object.custom_cover_image_url %]
75
                                        [% IF custom_cover_image_url %]
73
                                        [% IF custom_cover_image_url %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt (-3 / +9 lines)
Lines 80-90 Link Here
80
                                        [% END %]
80
                                        [% END %]
81
                                    [% END %]
81
                                    [% END %]
82
                                [% END %]
82
                                [% END %]
83
83
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
84
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
84
                                [% IF ( BakerTaylorEnabled ) %]
85
                                [% IF ( Koha.Preference( "OPACBakerTaylorEnabled" ) ) %]
86
                                    [% SET BakerTaylorImageURL = "https://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=${ Koha.Preference('BakerTaylorUsername') }&Password=${ Koha.Preference('BakerTaylorPassword') }&Options=Y&Return=T&Type=S&Value=$bt_id" %]
85
                                    [% IF bt_id %]
87
                                    [% IF bt_id %]
86
                                        <![CDATA[
88
                                        <![CDATA[
87
                                            <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a>
89
                                            [% IF ( Koha.Preference( "BakerTaylorBookstoreURL" ) ) %]
90
                                                <a href="https://[% Koha.Preference( "BakerTaylorBookstoreURL" ) |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %]" /></a>
91
                                            [% ELSE %]
92
                                                <img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %]" />
93
                                            [% END %]
88
                                        ]]>
94
                                        ]]>
89
                                    [% END %]
95
                                    [% END %]
90
                                [% END %]
96
                                [% END %]
Lines 193-199 Link Here
193
                                    [% END %]
199
                                    [% END %]
194
                                [% END %]
200
                                [% END %]
195
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
201
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
196
                                [% IF ( BakerTaylorEnabled ) %]
202
                                [% IF ( OPACBakerTaylorEnabled ) %]
197
                                    [% IF bt_id %]
203
                                    [% IF bt_id %]
198
                                        <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a>
204
                                        <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a>
199
                                    [% END %]
205
                                    [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt (-9 / +4 lines)
Lines 157-172 Link Here
157
                            [% END %]
157
                            [% END %]
158
                        [% END %]
158
                        [% END %]
159
159
160
                         [% IF BakerTaylorEnabled || SyndeticsEnabled && SyndeticsCoverImages %]
160
                         [% IF Koha.Preference( "OPACBakerTaylorEnabled" ) %]
161
                             [% SET normalized_upc = biblio.normalized_upc %]
161
                            [% bt_id = ( biblio.normalized_upc || biblio.normalized_isbn ) %]
162
                         [% END %]
162
                            [% IF ( bt_id ) %]
163
                         [% IF BakerTaylorEnabled %]
164
                             [% bt_id = ( normalized_upc || normalized_isbn ) %]
165
                             [% IF ( bt_id ) %]
166
                                <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
163
                                <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
167
                             [% ELSE %]
164
                            [% END %]
168
                                <span class="no-image">No cover image available</span>
169
                             [% END %]
170
                        [% END %]
165
                        [% END %]
171
166
172
                        [% IF SyndeticsEnabled && SyndeticsCoverImages %]
167
                        [% IF SyndeticsEnabled && SyndeticsCoverImages %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-15 / +7 lines)
Lines 306-330 Link Here
306
                                                                <span class="no-image">No cover image available</span>
306
                                                                <span class="no-image">No cover image available</span>
307
                                                            [% END %]
307
                                                            [% END %]
308
                                                        [% END %]
308
                                                        [% END %]
309
310
                                                        [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
311
                                                            [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
312
                                                            [% IF ( bt_id ) %]
313
                                                                <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
314
                                                            [% ELSE %]
315
                                                                <span class="no-image">No cover image available</span>
316
                                                            [% END %]
317
                                                        [% END %]
318
                                                    </a>
309
                                                    </a>
319
310
320
                                                    [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
311
                                                    [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
321
                                                        [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
312
                                                    [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
322
                                                        [% IF ( bt_id ) %]
313
                                                        [% SET BakerTaylorImageURL = "https://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=${ Koha.Preference('BakerTaylorUsername') }&Password=${ Koha.Preference('BakerTaylorPassword') }&Options=Y&Return=T&Type=S&Value=$bt_id" %]
323
                                                            <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
314
                                                        [% IF ( BakerTaylorLinkURL ) %]
324
                                                                <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
315
                                                            <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]">
316
                                                                <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %]" />
325
                                                            </a>
317
                                                            </a>
326
                                                        [% ELSE %]
318
                                                        [% ELSE %]
327
                                                            <span class="no-image">No cover image available</span>
319
                                                            <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %]" />
328
                                                        [% END %]
320
                                                        [% END %]
329
                                                    [% END %]
321
                                                    [% END %]
330
322
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-14 / +6 lines)
Lines 434-456 Link Here
434
                                                                [% END %]
434
                                                                [% END %]
435
435
436
                                                            </a> <!-- / .p1 -->
436
                                                            </a> <!-- / .p1 -->
437
                                                            [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
438
                                                                [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
439
                                                                [% IF ( bt_id ) %]
440
                                                                    <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
441
                                                                [% ELSE %]
442
                                                                    <span class="no-image">No cover image available</span>
443
                                                                [% END %]
444
                                                            [% END %]
445
437
446
                                                            [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
438
                                                            [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
447
                                                                [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
439
                                                            [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
448
                                                                [% IF ( bt_id ) %]
440
                                                                [% IF ( BakerTaylorLinkURL ) %]
449
                                                                    <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
441
                                                                    <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]">
450
                                                                        <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
442
                                                                        <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
451
                                                                    </a>
443
                                                                    </a>
452
                                                                [% ELSE %]
444
                                                                [% ELSE %]
453
                                                                    <span class="no-image">No cover image available</span>
445
                                                                    <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
454
                                                                [% END %]
446
                                                                [% END %]
455
                                                            [% END %]
447
                                                            [% END %]
456
448
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt (-1 / +3 lines)
Lines 17-23 Link Here
17
[% END %][% END %][% END %]
17
[% END %][% END %][% END %]
18
18
19
[% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
19
[% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
20
[% IF ( BakerTaylorEnabled && bt_id ) %]<a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>[% END %]
20
[% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
21
    <a href="https://[% BakerTaylorLinkURL | uri %][% bt_id | uri %]"><img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
22
[% END %]
21
23
22
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
24
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
23
    [% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %]
25
    [% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt (-4 / +7 lines)
Lines 124-135 Link Here
124
                                            [% END %]
124
                                            [% END %]
125
                                        [% END %]
125
                                        [% END %]
126
                                            </a>
126
                                            </a>
127
127
                                        [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
128
                                        [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
128
                                        [% IF ( BakerTaylorEnabled ) %]
129
                                        [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
129
                                            [% IF ( bt_id ) %]
130
                                            [% IF ( BakerTaylorLinkURL ) %]
130
                                                <a href="https://[% review.BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% review.BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
131
                                                <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]">
132
                                                    <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
133
                                                </a>
131
                                            [% ELSE %]
134
                                            [% ELSE %]
132
                                                <span class="no-image">No cover image available</span>
135
                                                <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
133
                                            [% END %]
136
                                            [% END %]
134
                                        [% END %]
137
                                        [% END %]
135
138
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-10 / +14 lines)
Lines 379-390 Link Here
379
                                                                [% END %]
379
                                                                [% END %]
380
                                                            [% END %]
380
                                                            [% END %]
381
381
382
                                                            [% IF ( BakerTaylorEnabled ) %]
382
                                                            [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
383
                                                                [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
383
                                                            [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
384
                                                                [% IF ( bt_id ) %]
384
                                                                [% IF ( BakerTaylorLinkURL ) %]
385
                                                                    <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
385
                                                                    <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]">
386
                                                                        <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
387
                                                                    </a>
386
                                                                [% ELSE %]
388
                                                                [% ELSE %]
387
                                                                    <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
389
                                                                    <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
388
                                                                [% END %]
390
                                                                [% END %]
389
                                                            [% END %]
391
                                                            [% END %]
390
392
Lines 757-768 Link Here
757
                                                            [% END %]
759
                                                            [% END %]
758
                                                        [% END %]
760
                                                        [% END %]
759
761
760
                                                        [% IF ( BakerTaylorEnabled ) %]
762
                                                        [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
761
                                                            [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
763
                                                        [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
762
                                                            [% IF ( bt_id ) %]
764
                                                            [% IF ( BakerTaylorLinkURL ) %]
763
                                                                <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
765
                                                                <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]">
766
                                                                    <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
767
                                                                </a>
764
                                                            [% ELSE %]
768
                                                            [% ELSE %]
765
                                                                <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
769
                                                                <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
766
                                                            [% END %]
770
                                                            [% END %]
767
                                                        [% END %]
771
                                                        [% END %]
768
772
(-)a/opac/opac-readingrecord.pl (-4 / +2 lines)
Lines 93-109 my $old_checkouts = [ Link Here
93
    )->as_list
93
    )->as_list
94
];
94
];
95
95
96
if (C4::Context->preference('BakerTaylorEnabled')) {
96
if (C4::Context->preference('OPACBakerTaylorEnabled')) {
97
	$template->param(
97
	$template->param(
98
		JacketImages=>1,
98
		JacketImages=>1,
99
		BakerTaylorEnabled  => 1,
100
		BakerTaylorImageURL => &image_url(),
99
		BakerTaylorImageURL => &image_url(),
101
		BakerTaylorLinkURL  => &link_url(),
100
		BakerTaylorLinkURL  => &link_url(),
102
		BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
103
	);
101
	);
104
}
102
}
105
103
106
for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above
104
for(qw(AmazonCoverImages GoogleJackets)) { # OPACBakerTaylorEnabled handled above
107
	C4::Context->preference($_) or next;
105
	C4::Context->preference($_) or next;
108
	$template->param($_=>1);
106
	$template->param($_=>1);
109
	$template->param(JacketImages=>1);
107
	$template->param(JacketImages=>1);
(-)a/opac/opac-search.pl (-3 / +1 lines)
Lines 166-177 $template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResults Link Here
166
$template->param(
166
$template->param(
167
    OpacStarRatings => C4::Context->preference("OpacStarRatings") );
167
    OpacStarRatings => C4::Context->preference("OpacStarRatings") );
168
168
169
if (C4::Context->preference('BakerTaylorEnabled')) {
169
if (C4::Context->preference('OPACBakerTaylorEnabled')) {
170
    $template->param(
170
    $template->param(
171
        BakerTaylorEnabled  => 1,
172
        BakerTaylorImageURL => &image_url(),
171
        BakerTaylorImageURL => &image_url(),
173
        BakerTaylorLinkURL  => &link_url(),
172
        BakerTaylorLinkURL  => &link_url(),
174
        BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
175
    );
173
    );
176
}
174
}
177
175
(-)a/opac/opac-shelves.pl (-1 / +1 lines)
Lines 79-85 if( $op eq 'view' || $op eq 'list' ){ Link Here
79
        });
79
        });
80
}
80
}
81
81
82
if (C4::Context->preference("BakerTaylorEnabled")) {
82
if (C4::Context->preference("OPACBakerTaylorEnabled")) {
83
    $template->param(
83
    $template->param(
84
        BakerTaylorImageURL => &image_url(),
84
        BakerTaylorImageURL => &image_url(),
85
        BakerTaylorLinkURL  => &link_url(),
85
        BakerTaylorLinkURL  => &link_url(),
(-)a/opac/opac-showreviews.pl (+8 lines)
Lines 31-36 use C4::Koha qw( Link Here
31
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
32
use Koha::DateUtils qw( dt_from_string );
32
use Koha::DateUtils qw( dt_from_string );
33
use Koha::Biblios;
33
use Koha::Biblios;
34
use C4::External::BakerTaylor qw( image_url link_url );
34
use Koha::Patrons;
35
use Koha::Patrons;
35
use Koha::Reviews;
36
use Koha::Reviews;
36
use POSIX qw( ceil floor );
37
use POSIX qw( ceil floor );
Lines 188-193 $template->param( PAGE_NUMBERS => \@page_numbers, Link Here
188
                    previous_page_offset => $previous_page_offset) unless $pages < 2;
189
                    previous_page_offset => $previous_page_offset) unless $pages < 2;
189
$template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
190
$template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
190
191
192
if ( C4::Context->preference("OPACBakerTaylorEnabled") ) {
193
    $template->param(
194
        BakerTaylorImageURL => &image_url(),
195
        BakerTaylorLinkURL  => &link_url(),
196
    );
197
}
198
191
$template->param(
199
$template->param(
192
    reviews => $reviews,
200
    reviews => $reviews,
193
    results_per_page => $results_per_page,
201
    results_per_page => $results_per_page,
(-)a/opac/opac-user.pl (-5 / +2 lines)
Lines 339-356 if ( C4::Context->preference('UseRecalls') ) { Link Here
339
    $template->param( RECALLS => $recalls );
339
    $template->param( RECALLS => $recalls );
340
}
340
}
341
341
342
if (C4::Context->preference('BakerTaylorEnabled')) {
342
if (C4::Context->preference('OPACBakerTaylorEnabled')) {
343
    $template->param(
343
    $template->param(
344
        BakerTaylorEnabled  => 1,
345
        BakerTaylorImageURL => &image_url(),
344
        BakerTaylorImageURL => &image_url(),
346
        BakerTaylorLinkURL  => &link_url(),
345
        BakerTaylorLinkURL  => &link_url(),
347
        BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
348
    );
346
    );
349
}
347
}
350
348
351
if (C4::Context->preference("OPACAmazonCoverImages") or 
349
if (C4::Context->preference("OPACAmazonCoverImages") or 
352
    C4::Context->preference("GoogleJackets") or
350
    C4::Context->preference("GoogleJackets") or
353
    C4::Context->preference("BakerTaylorEnabled") or
351
    C4::Context->preference("OPACBakerTaylorEnabled") or
354
    C4::Context->preference("SyndeticsCoverImages") or
352
    C4::Context->preference("SyndeticsCoverImages") or
355
    ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') )
353
    ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') )
356
) {
354
) {
357
- 

Return to bug 28307