From 5c8dbe8d1868d2b55cdb405382066c59021f6331 Mon Sep 17 00:00:00 2001 From: danyonsewell Date: Tue, 20 Aug 2024 05:11:45 +0000 Subject: [PATCH] Bug 37463: Adding system preference. This patch allows cover images to display in the patron checkout module for selected patron categories but only ones from Amazon for now. Test plan: Step 1 - apply this patch Step 2 - Make sure AmazonCoverImages syspref is set to "show" step 3 - Search for the CoverImagesCategories syspref and enable it for a specific patron category (choose the category that your patron account is) step 4 - checkout an item to your patron account step 5 - in the patron checkouts page, click the "show checkouts" button, you should see the items cover image there, as long as there is one available from Amazon --- .../bug_37463-add_CoverImagesCategories_syspref.pl | 14 ++++++++++++++ ...g_37463-add_SCOCoverImagesCategories_syspref.pl | 14 -------------- installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../en/modules/admin/preferences/circulation.pref | 4 ++-- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 8 ++++++++ svc/checkouts | 12 ++++++++++++ 6 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_37463-add_CoverImagesCategories_syspref.pl delete mode 100644 installer/data/mysql/atomicupdate/bug_37463-add_SCOCoverImagesCategories_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_37463-add_CoverImagesCategories_syspref.pl b/installer/data/mysql/atomicupdate/bug_37463-add_CoverImagesCategories_syspref.pl new file mode 100644 index 0000000000..2de9719c1c --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_37463-add_CoverImagesCategories_syspref.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "37463", + description => "Add new system preference CoverImagesCategories", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('CoverImagesCategories', '', NULL, 'Cover images will show in the patron checkouts table for selected patron categories. Please note: this only currently works for Amazon cover images.:', 'Free')}); + + say $out "Added system preference 'CoverImagesCategories'"; + }, +}; diff --git a/installer/data/mysql/atomicupdate/bug_37463-add_SCOCoverImagesCategories_syspref.pl b/installer/data/mysql/atomicupdate/bug_37463-add_SCOCoverImagesCategories_syspref.pl deleted file mode 100644 index 240fb80ae7..0000000000 --- a/installer/data/mysql/atomicupdate/bug_37463-add_SCOCoverImagesCategories_syspref.pl +++ /dev/null @@ -1,14 +0,0 @@ -use Modern::Perl; - -return { - bug_number => "37463", - description => "Add new system preference SCOCoverImagesCategories", - up => sub { - my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - - $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('SCOCoverImagesCategories', '', NULL, 'Cover images will show for checked out items in the self checkout module for selected patron categories:', 'Free')}); - - say $out "Added system preference 'SCOCoverImagesCategories'"; - }, -}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 1f7fc68999..93db6c339a 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -685,7 +685,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'), ('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'), ('SCOBatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch while logged into Self Checkout','Free'), -('SCOCoverImagesCategories', '', NULL, 'Cover images will show for checked out items in the self checkout module for selected patron categories:', 'Free'), +('CoverImagesCategories', '', NULL, 'Cover images will show in the patron checkouts table for selected patron categories. Please note: this only currently works for Amazon cover images', 'Free'), ('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the Self Checkout','YesNo'), ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded