From eb733b4e5b27e925d2e950431bde92240a59a4bf Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 6 Dec 2024 12:10:49 +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 | 17 ++++++------- .../bootstrap/en/modules/opac-opensearch.tt | 11 ++++++--- .../en/modules/opac-readingrecord.tt | 13 ++++------ .../bootstrap/en/modules/opac-results.tt | 2 +- .../bootstrap/en/modules/opac-shelves.tt | 21 +++++----------- .../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-showreviews.pl | 8 +++++++ opac/opac-user.pl | 8 +++---- 16 files changed, 73 insertions(+), 70 deletions(-) diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm index 37b4a76ec4..e05b77ad8f 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 f49557be9c..42612dcb19 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -471,6 +471,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 69ca764776..2a75e3329b 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 %] @@ -468,7 +470,7 @@ - [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || Koha.Preference('BakerTaylorEnabled') || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] + [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || SyndeticsCovers || BakerTaylorEnabled || CustomCoverImages ) %] [% END %] @@ -480,7 +482,7 @@ [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] - [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || Koha.Preference('BakerTaylorEnabled') || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] + [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || SyndeticsCovers || BakerTaylorEnabled || CustomCoverImages ) %]
 Results
[% IF ( LocalCoverImages && SEARCH_RESULT.has_local_cover_image ) %] @@ -525,7 +527,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" %]
[% IF BakerTaylorBookstoreURL %] @@ -541,7 +543,7 @@
[% 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 %]
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 50d78ea97b..7b5824ccab 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -144,7 +144,7 @@ [% Asset.js("js/localcovers.js") | $raw %] [% END %] -[% IF ( BakerTaylorEnabled ) %] +[% IF ( OPACBakerTaylorEnabled ) %] [% Asset.js("js/bakertaylorimages.js") | $raw %]