From 7c9d82635c2dc050d2bcecbae8a30c0987400e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Tue, 18 Apr 2017 15:55:06 +0200 Subject: [PATCH] [SIGNED-OFF] Bug 17381: Add system preference SCOMainUserBlock This patch adds a system preference SCOMainUserBlock to display custom HTML on the self checkout page. To test: - Set up self checkout (see section Self Checkout in Circulaton sysprefs ) - Apply patch - Update db - Add some HTML system preference SCOMainUserBlock - Go to sco page - Verify that HTML displays on page (logged in and not logged in) Signed-off-by: Josef Moravec --- .../data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl | 9 +++++++++ installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/circulation.pref | 5 +++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 3 ++- opac/sco/sco-main.pl | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl diff --git a/installer/data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl b/installer/data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl new file mode 100644 index 0000000..94a5d61 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` ) VALUES ('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea')" ); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 17381 - Add system preference SCOMainUserBlock)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 0bd8cac..71bd735 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -462,6 +462,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), ('RoutingListNote','To change this note edit RoutingListNote system preference.','70|10','Define a note to be shown on all routing lists','Textarea'), ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), +('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'), ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded