Bugzilla – Attachment 119145 Details for
Bug 28083
Add system preference that allows users to insert HTML in the <head> on all staff pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28083: Add IntranetHTMLHead system preference
Bug-28083-Add-IntranetHTMLHead-system-preference.patch (text/plain), 4.17 KB, created by
Lucas Gass (lukeg)
on 2021-04-02 20:05:03 UTC
(
hide
)
Description:
Bug 28083: Add IntranetHTMLHead system preference
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2021-04-02 20:05:03 UTC
Size:
4.17 KB
patch
obsolete
>From a1f5937cb5265496bc6eecd5351ed66661d6af42 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 2 Apr 2021 20:01:58 +0000 >Subject: [PATCH] Bug 28083: Add IntranetHTMLHead system preference > >To tes: >-Apply patch >-Look for the syspref IntranetHTMLHead >-If you insert HTML it should be present inside the <head> on all pages in the staff interface >-An easy way to test is to add something like this: <style>body{ background: red !important } </style> >-All staff interface pages should then have a red background >--- > installer/data/mysql/atomicupdate/bug_28083_atomicupdate.perl | 6 ++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc | 2 ++ > .../prog/en/modules/admin/preferences/staff_interface.pref | 6 ++++++ > 4 files changed, 15 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_28083_atomicupdate.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_28083_atomicupdate.perl b/installer/data/mysql/atomicupdate/bug_28083_atomicupdate.perl >new file mode 100644 >index 0000000000..5cacb00723 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_28083_atomicupdate.perl >@@ -0,0 +1,6 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetHTMLHead','', 'Allow the insertion of HTML in the document <head>', NULL,'textarea')" ); >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 28083, "Allow the insertion of HTML in the document <head> via system preference"); >+} >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index b513bd37bd..03029422cf 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -271,6 +271,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('IntranetCoce','0', NULL, 'If on, enables cover retrieval from the configured Coce server in the staff interface', 'YesNo'), > ('intranetcolorstylesheet','','50','Define the color stylesheet to use in the staff interface','free'), > ('IntranetFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the staff interface','free'), >+('IntranetHTMLHead','',NULL,'Add HTML to be included in the OPAC in the document <head> tag.','free'), > ('IntranetmainUserblock','','70|10','Add a block of HTML that will display on the intranet home page','Textarea'), > ('IntranetNav','','70|10','Use HTML tabs to add navigational links to the top-hand navigational bar in the staff interface','Textarea'), > ('IntranetNumbersPreferPhrase','0',NULL,'Control the use of phr operator in callnumber and standard number staff interface searches','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >index c2833e3009..d580e07a4a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >@@ -42,3 +42,5 @@ var Koha = {}; > [% UNLESS ( footerjs ) %] > [% INCLUDE js_includes.inc %] > [% END %] >+ >+[% Koha.Preference( 'IntranetHTMLHead' ) | $raw %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >index a2b25e5168..403115af03 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >@@ -29,6 +29,12 @@ Staff interface: > syntax: javascript > class: code > - >+ - "Include the following in the HTML head on all pages in the staff interface::" >+ - pref: IntranetHTMLHead >+ type: textarea >+ syntax: html >+ class: code >+ - > - "Include the following CSS on all pages in the staff interface:" > - pref: IntranetUserCSS > type: textarea >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28083
:
119145
|
119170