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 471-476 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
471
('OPACAmazonCoverImages','0','','Display cover images on OPAC from Amazon Web Services','YesNo'),
471
('OPACAmazonCoverImages','0','','Display cover images on OPAC from Amazon Web Services','YesNo'),
472
('OPACAuthorIdentifiersAndInformation', '', '', 'Display author information on the OPAC detail page','multiple_sortable'),
472
('OPACAuthorIdentifiersAndInformation', '', '', 'Display author information on the OPAC detail page','multiple_sortable'),
473
('OpacAuthorities','1',NULL,'If ON, enables the search authorities link on OPAC','YesNo'),
473
('OpacAuthorities','1',NULL,'If ON, enables the search authorities link on OPAC','YesNo'),
474
('OPACBakerTaylorEnabled','0','','Enable or disable all Baker & Taylor features in the OPAC.','YesNo'),
474
('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'),
475
('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'),
475
('opacbookbag','1','','If ON, enables display of Cart feature','YesNo'),
476
('opacbookbag','1','','If ON, enables display of Cart feature','YesNo'),
476
('OpacBrowser','0',NULL,'If ON, enables subject authorities browser on OPAC (needs to set misc/cronjob/sbuild_browser_and_cloud.pl)','YesNo'),
477
('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 468-474 Link Here
468
                                <table>
470
                                <table>
469
                                    <thead>
471
                                    <thead>
470
                                    <tr>
472
                                    <tr>
471
                                        [% IF ( CoverImagePlugins || AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || Koha.Preference('BakerTaylorEnabled') || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
473
                                        [% IF ( CoverImagePlugins || AmazonCoverImages  || LocalCoverImages || IntranetCoce || SyndeticsCovers || BakerTaylorEnabled || CustomCoverImages ) %]
472
                                            <th>&nbsp;</th>
474
                                            <th>&nbsp;</th>
473
                                        [% END %]
475
                                        [% END %]
474
                                        <th colspan="2">Results</th>
476
                                        <th colspan="2">Results</th>
Lines 480-486 Link Here
480
                                    <tbody>
482
                                    <tbody>
481
                                    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
483
                                    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
482
                                        <tr id="row[% SEARCH_RESULT.biblionumber | html %]">
484
                                        <tr id="row[% SEARCH_RESULT.biblionumber | html %]">
483
                                            [% IF ( CoverImagePlugins || AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || Koha.Preference('BakerTaylorEnabled') || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
485
                                            [% IF ( CoverImagePlugins || AmazonCoverImages  || LocalCoverImages || IntranetCoce || SyndeticsCovers || BakerTaylorEnabled || CustomCoverImages ) %]
484
    <td class="bookcoverimg">
486
    <td class="bookcoverimg">
485
        <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 %]">
487
        <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 %]">
486
            [% IF ( LocalCoverImages && SEARCH_RESULT.has_local_cover_image ) %]
488
            [% IF ( LocalCoverImages && SEARCH_RESULT.has_local_cover_image ) %]
Lines 525-531 Link Here
525
            [% END %]
527
            [% END %]
526
528
527
            [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
529
            [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
528
            [% IF ( Koha.Preference('BakerTaylorEnabled') && bt_id ) %]
530
            [% IF ( BakerTaylorEnabled && bt_id ) %]
529
                [% 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" %]
531
                [% 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" %]
530
                <div class="cover-image bakertaylor-coverimg" id="bakertaylor-coverimg">
532
                <div class="cover-image bakertaylor-coverimg" id="bakertaylor-coverimg">
531
                    [% IF BakerTaylorBookstoreURL %]
533
                    [% IF BakerTaylorBookstoreURL %]
Lines 541-547 Link Here
541
                </div>
543
                </div>
542
            [% END %]
544
            [% END %]
543
545
544
            [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
546
            [% IF CustomCoverImages %]
545
                [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
547
                [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
546
                [% IF custom_cover_image_url %]
548
                [% IF custom_cover_image_url %]
547
                    <div id="custom-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image custom-coverimg">
549
                    <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 144-150 Link Here
144
    [% Asset.js("js/localcovers.js") | $raw %]
144
    [% Asset.js("js/localcovers.js") | $raw %]
145
[% END %]
145
[% END %]
146
146
147
[% IF ( BakerTaylorEnabled ) %]
147
[% IF ( OPACBakerTaylorEnabled ) %]
148
    [% Asset.js("js/bakertaylorimages.js") | $raw %]
148
    [% Asset.js("js/bakertaylorimages.js") | $raw %]
149
    <script>
149
    <script>
150
        $(window).load(function(){
150
        $(window).load(function(){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc (-10 / +7 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" data-isbn="[% item.browser_normalized_isbn | html%]">
32
                                <a class="shelfbrowser_cover" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser" data-isbn="[% item.browser_normalized_isbn | html%]">
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-76 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
                                    [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) %]
66
                                        [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) | html %]
66
                                    [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
67
                                        [% IF ( bt_id ) %]
67
                                        <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
68
                                            <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
68
                                     [% END %]
69
                                        [% ELSE %]
69
70
                                            <span class="no-image">No cover image available</span>
70
                                     [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
71
                                        [% END %]
72
                                    [% END %]
73
                                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
74
                                        [% SET custom_cover_image_url = item.biblio_object.custom_cover_image_url %]
71
                                        [% SET custom_cover_image_url = item.biblio_object.custom_cover_image_url %]
75
                                        [% IF custom_cover_image_url %]
72
                                        [% IF custom_cover_image_url %]
76
                                            <span class="custom_cover_image">
73
                                            <span class="custom_cover_image">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt (-3 / +8 lines)
Lines 81-90 Link Here
81
                                    [% END %]
81
                                    [% END %]
82
                                [% END %]
82
                                [% END %]
83
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
83
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
84
                                [% IF ( BakerTaylorEnabled ) %]
84
                                [% IF ( Koha.Preference( "OPACBakerTaylorEnabled" ) ) %]
85
                                    [% 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 %]
86
                                    [% IF bt_id %]
86
                                        <![CDATA[
87
                                        <![CDATA[
87
                                            <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a>
88
                                            [% IF ( Koha.Preference( "BakerTaylorBookstoreURL" ) ) %]
89
                                                <a href="https://[% Koha.Preference( "BakerTaylorBookstoreURL" ) |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %]" /></a>
90
                                            [% ELSE %]
91
                                                <img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %]" />
92
                                            [% END %]
88
                                        ]]>
93
                                        ]]>
89
                                    [% END %]
94
                                    [% END %]
90
                                [% END %]
95
                                [% END %]
Lines 193-199 Link Here
193
                                    [% END %]
198
                                    [% END %]
194
                                [% END %]
199
                                [% END %]
195
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
200
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
196
                                [% IF ( BakerTaylorEnabled ) %]
201
                                [% IF ( OPACBakerTaylorEnabled ) %]
197
                                    [% IF bt_id %]
202
                                    [% 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>
203
                                        <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a>
199
                                    [% END %]
204
                                    [% 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 (-1 / +1 lines)
Lines 20-26 Link Here
20
[% SET SyndeticsCoverImages = ( Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') ) %]
20
[% SET SyndeticsCoverImages = ( Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') ) %]
21
[% SET GoogleJackets = Koha.Preference('GoogleJackets') %]
21
[% SET GoogleJackets = Koha.Preference('GoogleJackets') %]
22
[% SET OpenLibraryCovers = Koha.Preference('OpenLibraryCovers') %]
22
[% SET OpenLibraryCovers = Koha.Preference('OpenLibraryCovers') %]
23
[% SET BakerTaylorEnabled = Koha.Preference('BakerTaylorEnabled') %]
23
[% SET BakerTaylorEnabled = Koha.Preference('OPACBakerTaylorEnabled') %]
24
[% SET OPACCoce = ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') ) %]
24
[% SET OPACCoce = ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') ) %]
25
[% IF ( CoverImagePlugins || OPACLocalCoverImages || OPACAmazonCoverImages || SyndeticsCoverImages || GoogleJackets || OpenLibraryCovers || BakerTaylorEnabled || OPACCoce || OPACCustomCoverImages ) %]
25
[% IF ( CoverImagePlugins || OPACLocalCoverImages || OPACAmazonCoverImages || SyndeticsCoverImages || GoogleJackets || OpenLibraryCovers || BakerTaylorEnabled || OPACCoce || OPACCustomCoverImages ) %]
26
    [% IF firstPage %]
26
    [% IF firstPage %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-15 / +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') ) %]
437
                                                            [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
438
                                                                [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
438
                                                            [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
439
                                                                [% IF ( bt_id ) %]
439
                                                                [% IF ( BakerTaylorLinkURL ) %]
440
                                                                    <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
440
                                                                    <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]">
441
                                                                [% ELSE %]
441
                                                                        <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
442
                                                                    <span class="no-image">No cover image available</span>
443
                                                                [% END %]
444
                                                            [% END %]
445
446
                                                            [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
447
                                                                [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
448
                                                                [% IF ( bt_id ) %]
449
                                                                    <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
450
                                                                        <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
451
                                                                    </a>
442
                                                                    </a>
452
                                                                [% ELSE %]
443
                                                                [% ELSE %]
453
                                                                    <span class="no-image">No cover image available</span>
444
                                                                    <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
454
                                                                [% END %]
445
                                                                [% END %]
455
                                                            [% END %]
446
                                                            [% END %]
456
447
(-)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 380-391 Link Here
380
                                                                [% END %]
380
                                                                [% END %]
381
                                                            [% END %]
381
                                                            [% END %]
382
382
383
                                                            [% IF ( BakerTaylorEnabled ) %]
383
                                                            [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
384
                                                                [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
384
                                                            [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
385
                                                                [% IF ( bt_id ) %]
385
                                                                [% IF ( BakerTaylorLinkURL ) %]
386
                                                                    <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
386
                                                                    <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]">
387
                                                                        <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
388
                                                                    </a>
387
                                                                [% ELSE %]
389
                                                                [% ELSE %]
388
                                                                    <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
390
                                                                    <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
389
                                                                [% END %]
391
                                                                [% END %]
390
                                                            [% END %]
392
                                                            [% END %]
391
393
Lines 756-767 Link Here
756
                                                            [% END %]
758
                                                            [% END %]
757
                                                        [% END %]
759
                                                        [% END %]
758
760
759
                                                        [% IF ( BakerTaylorEnabled ) %]
761
                                                        [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
760
                                                            [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
762
                                                        [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %]
761
                                                            [% IF ( bt_id ) %]
763
                                                            [% IF ( BakerTaylorLinkURL ) %]
762
                                                                <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
764
                                                                <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]">
765
                                                                    <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
766
                                                                </a>
763
                                                            [% ELSE %]
767
                                                            [% ELSE %]
764
                                                                <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
768
                                                                <img alt="Cover image from Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
765
                                                            [% END %]
769
                                                            [% END %]
766
                                                        [% END %]
770
                                                        [% END %]
767
771
(-)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-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 (-6 / +3 lines)
Lines 289-295 if ( $pending_checkouts->count ) { # Useless test Link Here
289
        my $isbn = GetNormalizedISBN($issue->{'isbn'});
289
        my $isbn = GetNormalizedISBN($issue->{'isbn'});
290
        $issue->{normalized_isbn} = $isbn;
290
        $issue->{normalized_isbn} = $isbn;
291
291
292
        if (   C4::Context->preference('BakerTaylorEnabled')
292
        if (   C4::Context->preference('OPACBakerTaylorEnabled')
293
            || C4::Context->preference('SyndeticsEnabled')
293
            || C4::Context->preference('SyndeticsEnabled')
294
            || C4::Context->preference('SyndeticsCoverImages') )
294
            || C4::Context->preference('SyndeticsCoverImages') )
295
        {
295
        {
Lines 345-362 if ( C4::Context->preference('UseRecalls') ) { Link Here
345
    $template->param( RECALLS => $recalls );
345
    $template->param( RECALLS => $recalls );
346
}
346
}
347
347
348
if (C4::Context->preference('BakerTaylorEnabled')) {
348
if (C4::Context->preference('OPACBakerTaylorEnabled')) {
349
    $template->param(
349
    $template->param(
350
        BakerTaylorEnabled  => 1,
351
        BakerTaylorImageURL => &image_url(),
350
        BakerTaylorImageURL => &image_url(),
352
        BakerTaylorLinkURL  => &link_url(),
351
        BakerTaylorLinkURL  => &link_url(),
353
        BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
354
    );
352
    );
355
}
353
}
356
354
357
if (C4::Context->preference("OPACAmazonCoverImages") or 
355
if (C4::Context->preference("OPACAmazonCoverImages") or 
358
    C4::Context->preference("GoogleJackets") or
356
    C4::Context->preference("GoogleJackets") or
359
    C4::Context->preference("BakerTaylorEnabled") or
357
    C4::Context->preference("OPACBakerTaylorEnabled") or
360
    C4::Context->preference("SyndeticsCoverImages") or
358
    C4::Context->preference("SyndeticsCoverImages") or
361
    ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') )
359
    ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') )
362
) {
360
) {
363
- 

Return to bug 28307