From 2c93823d75647d28b05013fff79e4424eb1de9cd Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 24 Aug 2022 15:27:50 +0000 Subject: [PATCH] Bug 31446: Add new OpacLightboxImageDescriptions system preference Sponsored-by: Toi Ohomai Institute of Technology, New Zealand --- ...1446-add_OpacLightboxImageDescriptions_syspref.pl | 12 ++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../modules/admin/preferences/enhanced_content.pref | 7 +++++++ 3 files changed, 20 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_31446-add_OpacLightboxImageDescriptions_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_31446-add_OpacLightboxImageDescriptions_syspref.pl b/installer/data/mysql/atomicupdate/bug_31446-add_OpacLightboxImageDescriptions_syspref.pl new file mode 100755 index 00000000000..9dbcd655b4c --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_31446-add_OpacLightboxImageDescriptions_syspref.pl @@ -0,0 +1,12 @@ +use Modern::Perl; + +return { + bug_number => "31446", + description => "Add new system preference OpacLightboxImageDescriptions", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacLightboxImageDescriptions', '1', '', 'Show descriptions under each cover image in the lightbox gallery on item detail pages on the OPAC', 'YesNo') }); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 98d1fa443da..18bfb258939 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -451,6 +451,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OPACLanguages','en',NULL,'Set the default language in the OPAC.','Languages'), ('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'), ('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'), +('OpacLightboxImageDescriptions', '1', '', 'Show descriptions under each cover image in the lightbox gallery on item detail pages on the OPAC', 'YesNo'), ('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'), ('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'), ('OpacLocationOnDetail','holding','holding|home|both|column','In the OPAC detail, display the shelving location on its own column or under a library columns.', 'Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref index c53b35677c0..e2f4bbc7e65 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref @@ -16,6 +16,13 @@ Enhanced content: 1: Show 0: "Don't show" - other editions of an item on the OPAC. + - + - pref: OpacLightboxImageDescriptions + default: 1 + choices: + 1: Show + 0: "Don't show" + - descriptions under each cover image in the lightbox gallery on item detail pages on the OPAC. Amazon: - - Use Amazon data from its -- 2.20.1