Bugzilla – Attachment 169063 Details for
Bug 28307
Enable BakerTaylorEnabled content in the staff interface with separate system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28307: (follow-up) Correct OPAC references to OPACBakerTaylorEnabled
Bug-28307-follow-up-Correct-OPAC-references-to-OPA.patch (text/plain), 32.68 KB, created by
Owen Leonard
on 2024-07-16 18:56:37 UTC
(
hide
)
Description:
Bug 28307: (follow-up) Correct OPAC references to OPACBakerTaylorEnabled
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-07-16 18:56:37 UTC
Size:
32.68 KB
patch
obsolete
>From d6dc1edb9a4348d657eb48830ba1133cd5929690 Mon Sep 17 00:00:00 2001 >From: Owen <oleonard@myacpl.org> >Date: Tue, 2 Nov 2021 13:48:43 +0000 >Subject: [PATCH] Bug 28307: (follow-up) Correct OPAC references to > OPACBakerTaylorEnabled > >This patch adds the new OPACBakerTaylorEnabled preferences to OPAC >templates and scripts which were missed in the first patch. The patch >also adds OPACBakerTaylorEnabled to UsageStats.pm and sysprefs.sql. > >Check these pages in the OPAC: > > - Catalog -> Search results > - And search results -> RSS > - Catalog -> Bibliographic details page -> Shelf browser > - Catalog -> Lists -> List contents > - Catalog -> Recent comments > - And recent comments -> RSS > - Your summary -> Checkouts and Overdues >--- > C4/UsageStats.pm | 1 + > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/modules/catalogue/results.tt | 10 ++++---- > .../bootstrap/en/includes/opac-bottom.inc | 2 +- > .../bootstrap/en/includes/shelfbrowser.inc | 14 +++++------ > .../bootstrap/en/modules/opac-opensearch.tt | 12 +++++++--- > .../en/modules/opac-readingrecord.tt | 13 ++++------ > .../bootstrap/en/modules/opac-results.tt | 22 ++++++----------- > .../bootstrap/en/modules/opac-shelves.tt | 20 +++++----------- > .../en/modules/opac-showreviews-rss.tt | 4 +++- > .../bootstrap/en/modules/opac-showreviews.tt | 11 +++++---- > .../bootstrap/en/modules/opac-user.tt | 24 +++++++++++-------- > opac/opac-readingrecord.pl | 6 ++--- > opac/opac-search.pl | 4 +--- > opac/opac-shelves.pl | 2 +- > opac/opac-showreviews.pl | 8 +++++++ > opac/opac-user.pl | 6 ++--- > 17 files changed, 79 insertions(+), 81 deletions(-) > >diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm >index fe3b092da2..8a55445355 100644 >--- a/C4/UsageStats.pm >+++ b/C4/UsageStats.pm >@@ -248,6 +248,7 @@ sub _shared_preferences { > OPACAmazonCoverImages > Babeltheque > BakerTaylorEnabled >+ OPACBakerTaylorEnabled > GoogleJackets > HTML5MediaEnabled > LibraryThingForLibrariesEnabled >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 94acbe3e1c..b2e336b047 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -464,6 +464,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OPACAmazonCoverImages','0','','Display cover images on OPAC from Amazon Web Services','YesNo'), > ('OPACAuthorIdentifiersAndInformation', '', '', 'Display author information on the OPAC detail page','multiple_sortable'), > ('OpacAuthorities','1',NULL,'If ON, enables the search authorities link on OPAC','YesNo'), >+('OPACBakerTaylorEnabled','0','','Enable or disable all Baker & Taylor features in the OPAC.','YesNo'), > ('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'), > ('opacbookbag','1','','If ON, enables display of Cart feature','YesNo'), > ('OpacBrowser','0',NULL,'If ON, enables subject authorities browser on OPAC (needs to set misc/cronjob/sbuild_browser_and_cloud.pl)','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index b597b6644a..e82e179d97 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -46,6 +46,8 @@ > [% CoceHost = Koha.Preference('CoceHost') %] > [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %] > [% SyndeticsCoverImageSize = Koha.Preference('SyndeticsCoverImageSize') %] >+[% CustomCoverImages = ( Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') ) %] >+[% BakerTaylorEnabled = Koha.Preference('BakerTaylorEnabled') %] > > [% WRAPPER 'sub-header.inc' %] > [% WRAPPER breadcrumbs %] >@@ -465,7 +467,7 @@ > <table> > <thead> > <tr> >- [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || Koha.Preference('BakerTaylorEnabled') || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || SyndeticsCovers || BakerTaylorEnabled || CustomCoverImages ) %] > <th> </th> > [% END %] > <th colspan="2">Results</th> >@@ -477,7 +479,7 @@ > <tbody> > [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] > <tr id="row[% SEARCH_RESULT.biblionumber | html %]"> >- [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || Koha.Preference('BakerTaylorEnabled') || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || SyndeticsCovers || BakerTaylorEnabled || CustomCoverImages ) %] > <td class="bookcoverimg"> > <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 %]"> > [% IF ( LocalCoverImages && SEARCH_RESULT.has_local_cover_image ) %] >@@ -522,7 +524,7 @@ > [% END %] > > [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %] >- [% IF ( Koha.Preference('BakerTaylorEnabled') && bt_id ) %] >+ [% IF ( BakerTaylorEnabled && bt_id ) %] > [% 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" %] > <div class="cover-image bakertaylor-coverimg" id="bakertaylor-coverimg"> > [% IF BakerTaylorBookstoreURL %] >@@ -538,7 +540,7 @@ > </div> > [% END %] > >- [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] >+ [% IF CustomCoverImages %] > [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %] > [% IF custom_cover_image_url %] > <div id="custom-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image custom-coverimg"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index 937cad9a61..bda2cfe7b6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -214,7 +214,7 @@ > [% Asset.js("js/localcovers.js") | $raw %] > [% END %] > >-[% IF ( BakerTaylorEnabled ) %] >+[% IF ( OPACBakerTaylorEnabled ) %] > [% Asset.js("js/bakertaylorimages.js") | $raw %] > <script> > $(window).load(function(){ >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >index 78c6139142..a5d417c212 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >@@ -28,7 +28,7 @@ > [% img_title = item.biblionumber %] > [% END %] > >- [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || BakerTaylorEnabled || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) ) %] >+ [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || Koha.Preference('OPACBakerTaylorEnabled') || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) ) %] > <a class="shelfbrowser_cover" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser"> > [% IF ( OPACLocalCoverImages ) %] > <div title="[% img_title | html %]" class="[% item.biblionumber | html %] thumbnail-shelfbrowser" id="local-thumbnail-shelf-[% item.biblionumber | html %]"></div> >@@ -62,14 +62,12 @@ > [% coce_id = item.browser_normalized_ean || item.browser_normalized_isbn | html %] > <div title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail-preview-[% coce_id | html %]"></div> > [% END %] >- [% IF ( BakerTaylorEnabled ) %] >- [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) | html %] >- [% IF ( bt_id ) %] >- <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> >- [% ELSE %] >- <span class="no-image">No cover image available</span> >- [% END %] >+ >+ [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) %] >+ [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %] >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> > [% END %] >+ > [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] > [% SET custom_cover_image_url = item.biblio_object.custom_cover_image_url %] > [% IF custom_cover_image_url %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >index 14e7889834..c5c6382074 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >@@ -80,11 +80,17 @@ > [% END %] > [% END %] > [% END %] >+ > [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %] >- [% IF ( BakerTaylorEnabled ) %] >+ [% IF ( Koha.Preference( "OPACBakerTaylorEnabled" ) ) %] >+ [% 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" %] > [% IF bt_id %] > <![CDATA[ >- <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a> >+ [% IF ( Koha.Preference( "BakerTaylorBookstoreURL" ) ) %] >+ <a href="https://[% Koha.Preference( "BakerTaylorBookstoreURL" ) |url %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |url %]" /></a> >+ [% ELSE %] >+ <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |url %]" /> >+ [% END %] > ]]> > [% END %] > [% END %] >@@ -193,7 +199,7 @@ > [% END %] > [% END %] > [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %] >- [% IF ( BakerTaylorEnabled ) %] >+ [% IF ( OPACBakerTaylorEnabled ) %] > [% IF bt_id %] > <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index 63d678209f..966668b7ce 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -157,16 +157,11 @@ > [% END %] > [% END %] > >- [% IF BakerTaylorEnabled || SyndeticsEnabled && SyndeticsCoverImages %] >- [% SET normalized_upc = biblio.normalized_upc %] >- [% END %] >- [% IF BakerTaylorEnabled %] >- [% bt_id = ( normalized_upc || normalized_isbn ) %] >- [% IF ( bt_id ) %] >+ [% IF Koha.Preference( "OPACBakerTaylorEnabled" ) %] >+ [% bt_id = ( biblio.normalized_upc || biblio.normalized_isbn ) %] >+ [% IF ( bt_id ) %] > <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >- [% ELSE %] >- <span class="no-image">No cover image available</span> >- [% END %] >+ [% END %] > [% END %] > > [% IF SyndeticsEnabled && SyndeticsCoverImages %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index c92819eebf..e9d6cc28df 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -306,25 +306,17 @@ > <span class="no-image">No cover image available</span> > [% END %] > [% END %] >- >- [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %] >- [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %] >- [% IF ( bt_id ) %] >- <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> >- [% ELSE %] >- <span class="no-image">No cover image available</span> >- [% END %] >- [% END %] > </a> > >- [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %] >- [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %] >- [% IF ( bt_id ) %] >- <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]"> >- <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> >+ [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %] >+ [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %] >+ [% 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" %] >+ [% IF ( BakerTaylorLinkURL ) %] >+ <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]"> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %]" /> > </a> > [% ELSE %] >- <span class="no-image">No cover image available</span> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %]" /> > [% END %] > [% END %] > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index d1fc75c883..6b75bec6b5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -434,23 +434,15 @@ > [% END %] > > </a> <!-- / .p1 --> >- [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %] >- [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %] >- [% IF ( bt_id ) %] >- <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> >- [% ELSE %] >- <span class="no-image">No cover image available</span> >- [% END %] >- [% END %] > >- [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %] >- [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %] >- [% IF ( bt_id ) %] >- <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]"> >- <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> >+ [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %] >+ [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %] >+ [% IF ( BakerTaylorLinkURL ) %] >+ <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]"> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> > </a> > [% ELSE %] >- <span class="no-image">No cover image available</span> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> > [% END %] > [% END %] > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt >index e615310834..c899bc7450 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt >@@ -17,7 +17,9 @@ > [% END %][% END %][% END %] > > [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %] >-[% IF ( BakerTaylorEnabled && bt_id ) %]<a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>[% END %] >+[% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %] >+ <a href="https://[% BakerTaylorLinkURL | uri %][% bt_id | uri %]"><img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >+[% END %] > > [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] > [% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >index 517bcd82b0..fd9e14a168 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >@@ -124,12 +124,15 @@ > [% END %] > [% END %] > </a> >+ > [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %] >- [% IF ( BakerTaylorEnabled ) %] >- [% IF ( bt_id ) %] >- <a href="https://[% review.BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% review.BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >+ [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %] >+ [% IF ( BakerTaylorLinkURL ) %] >+ <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]"> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> >+ </a> > [% ELSE %] >- <span class="no-image">No cover image available</span> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> > [% END %] > [% END %] > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index ae3d38e045..da7091659e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -379,12 +379,14 @@ > [% END %] > [% END %] > >- [% IF ( BakerTaylorEnabled ) %] >- [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %] >- [% IF ( bt_id ) %] >- <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >+ [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %] >+ [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %] >+ [% IF ( BakerTaylorLinkURL ) %] >+ <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]"> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> >+ </a> > [% ELSE %] >- <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! --> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> > [% END %] > [% END %] > >@@ -757,12 +759,14 @@ > [% END %] > [% END %] > >- [% IF ( BakerTaylorEnabled ) %] >- [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %] >- [% IF ( bt_id ) %] >- <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >+ [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %] >+ [% IF ( Koha.Preference('OPACBakerTaylorEnabled') && bt_id ) %] >+ [% IF ( BakerTaylorLinkURL ) %] >+ <a href="https://[% BakerTaylorLinkURL | url %][% bt_id | url %]"> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> >+ </a> > [% ELSE %] >- <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! --> >+ <img alt="Cover image from Baker & Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" /> > [% END %] > [% END %] > >diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl >index a671ca0f01..db3d0ad80e 100755 >--- a/opac/opac-readingrecord.pl >+++ b/opac/opac-readingrecord.pl >@@ -93,17 +93,15 @@ my $old_checkouts = [ > )->as_list > ]; > >-if (C4::Context->preference('BakerTaylorEnabled')) { >+if (C4::Context->preference('OPACBakerTaylorEnabled')) { > $template->param( > JacketImages=>1, >- BakerTaylorEnabled => 1, > BakerTaylorImageURL => &image_url(), > BakerTaylorLinkURL => &link_url(), >- BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'), > ); > } > >-for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above >+for(qw(AmazonCoverImages GoogleJackets)) { # OPACBakerTaylorEnabled handled above > C4::Context->preference($_) or next; > $template->param($_=>1); > $template->param(JacketImages=>1); >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index a5d80ed585..6d1f247eec 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -166,12 +166,10 @@ $template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResults > $template->param( > OpacStarRatings => C4::Context->preference("OpacStarRatings") ); > >-if (C4::Context->preference('BakerTaylorEnabled')) { >+if (C4::Context->preference('OPACBakerTaylorEnabled')) { > $template->param( >- BakerTaylorEnabled => 1, > BakerTaylorImageURL => &image_url(), > BakerTaylorLinkURL => &link_url(), >- BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'), > ); > } > >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index 728dad57d1..27a928061f 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -79,7 +79,7 @@ if( $op eq 'view' || $op eq 'list' ){ > }); > } > >-if (C4::Context->preference("BakerTaylorEnabled")) { >+if (C4::Context->preference("OPACBakerTaylorEnabled")) { > $template->param( > BakerTaylorImageURL => &image_url(), > BakerTaylorLinkURL => &link_url(), >diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl >index 7a72214bbf..8bf97be9d9 100755 >--- a/opac/opac-showreviews.pl >+++ b/opac/opac-showreviews.pl >@@ -31,6 +31,7 @@ use C4::Koha qw( > use C4::Output qw( output_html_with_http_headers ); > use Koha::DateUtils qw( dt_from_string ); > use Koha::Biblios; >+use C4::External::BakerTaylor qw( image_url link_url ); > use Koha::Patrons; > use Koha::Reviews; > use POSIX qw( ceil floor ); >@@ -188,6 +189,13 @@ $template->param( PAGE_NUMBERS => \@page_numbers, > previous_page_offset => $previous_page_offset) unless $pages < 2; > $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number; > >+if ( C4::Context->preference("OPACBakerTaylorEnabled") ) { >+ $template->param( >+ BakerTaylorImageURL => &image_url(), >+ BakerTaylorLinkURL => &link_url(), >+ ); >+} >+ > $template->param( > reviews => $reviews, > results_per_page => $results_per_page, >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index a1b8b9f910..d60ea80f50 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -339,18 +339,16 @@ if ( C4::Context->preference('UseRecalls') ) { > $template->param( RECALLS => $recalls ); > } > >-if (C4::Context->preference('BakerTaylorEnabled')) { >+if (C4::Context->preference('OPACBakerTaylorEnabled')) { > $template->param( >- BakerTaylorEnabled => 1, > BakerTaylorImageURL => &image_url(), > BakerTaylorLinkURL => &link_url(), >- BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'), > ); > } > > if (C4::Context->preference("OPACAmazonCoverImages") or > C4::Context->preference("GoogleJackets") or >- C4::Context->preference("BakerTaylorEnabled") or >+ C4::Context->preference("OPACBakerTaylorEnabled") or > C4::Context->preference("SyndeticsCoverImages") or > ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') ) > ) { >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28307
:
123198
|
125708
|
125743
|
125744
|
127222
|
127223
|
127224
|
127225
|
131784
|
131785
|
131786
|
133274
|
133275
|
133276
|
138137
|
138138
|
138139
|
142193
|
142194
|
142195
|
169061
|
169062
| 169063