From 8bb8decf0122d67d20bd870d313b42bea63564fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Mon, 21 Aug 2017 15:27:20 +0200 Subject: [PATCH] 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) New version based on Koha.Preference TT plugin as of comment #7 Depends on Bug 12691 Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- .../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 | 2 +- 4 files changed, 16 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 0000000000..94a5d61483 --- /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 8401a48886..7e8b81a955 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -468,6 +468,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