From acd5927b43361137361492611646837f3776c643 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 2 Apr 2021 18:22:55 +0000 Subject: [PATCH] Bug 28080: Add OPACHTMLHead system preference To test: -Apply patch -Look for the syspref OPACHTMLHead -If you insert HTML it should be present inside the on all pages in the OPAC -An easy way to test is to add something like this: -All OPAC pages should then have a red background Signed-off-by: David Nind --- installer/data/mysql/atomicupdate/bug_28080_atomicupdate.perl | 7 +++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 6 ++++++ koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc | 1 + 4 files changed, 15 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_28080_atomicupdate.perl diff --git a/installer/data/mysql/atomicupdate/bug_28080_atomicupdate.perl b/installer/data/mysql/atomicupdate/bug_28080_atomicupdate.perl new file mode 100644 index 0000000000..aa3cecc43d --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28080_atomicupdate.perl @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACHTMLHead','', 'Allow the insertion of HTML in the document ', NULL,'textarea')" ); + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 28080, "Allow the insertion of HTML in the document via system preference"); +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index c48ad18d60..4825c081e7 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`, ` ('opacthemes','bootstrap','','Define the current theme for the OPAC interface.','Themes'), ('OpacTopissue','0',NULL,'If ON, enables the \'most popular items\' link on OPAC. Warning, this is an EXPERIMENTAL feature, turning ON may overload your server','YesNo'), ('OPACURLOpenInNewWindow','0',NULL,'If ON, URLs in the OPAC open in a new window','YesNo'), +('OPACHTMLHead','',NULL,'Add HTML to be included in the OPAC in the document tag.','free'), ('OPACUserCSS','',NULL,'Add CSS to be included in the OPAC in an embedded