From 6deab09c1317f202252afee99d06af5cdb533af0 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 27 Jan 2023 14:46:44 +0000 Subject: [PATCH] Bug 32721: (QA follow up) - fix QA issues This patches addresses issues raised by the QA tests. It also adds a missed import of the Branches file in the document head Signed-off-by: Lucas Gass Signed-off-by: Nick Clemens Bug 32721: (QA follow-up) Add missing imports Missing imports added in three template files Exec flag added to atomic update file Tinymce imports removed A new bug will be created to move codemirror into an inc file at latest version Test plan as before Signed-off-by: Nick Clemens Bug 32721: Tidy up - duplicate fetching of userjs and css Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm Test plan as per first commit Signed-off-by: Lucas Gass Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- C4/Auth.pm | 8 ++++++-- koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt | 6 ++---- .../opac-tmpl/bootstrap/en/includes/doc-head-close.inc | 1 + koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt | 5 +++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt | 5 +++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 5 +++++ t/db_dependent/Template/Plugin/Branches.t | 2 +- 7 files changed, 25 insertions(+), 7 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index cdc4ba8012..785cae3384 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -573,7 +573,6 @@ sub get_template_and_user { OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"), OPACShelfBrowser => "" . C4::Context->preference("OPACShelfBrowser"), OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"), - OPACUserCSS => "" . C4::Context->preference("OPACUserCSS"), OpacAuthorities => C4::Context->preference("OpacAuthorities"), opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, opac_search_limit => $opac_search_limit, @@ -593,7 +592,6 @@ sub get_template_and_user { OpacFavicon => C4::Context->preference("OpacFavicon"), opaclanguagesdisplay => "" . C4::Context->preference("opaclanguagesdisplay"), opacreadinghistory => C4::Context->preference("opacreadinghistory"), - OPACUserJS => C4::Context->preference("OPACUserJS"), opacuserlogin => "" . C4::Context->preference("opacuserlogin"), OpenLibrarySearch => C4::Context->preference("OpenLibrarySearch"), ShowReviewer => C4::Context->preference("ShowReviewer"), @@ -1374,6 +1372,12 @@ sub checkauth { OpacFavicon => C4::Context->preference("OpacFavicon"), opacreadinghistory => C4::Context->preference("opacreadinghistory"), opaclanguagesdisplay => C4::Context->preference("opaclanguagesdisplay"), + opacbookbag => "" . C4::Context->preference("opacbookbag"), + OpacCloud => C4::Context->preference("OpacCloud"), + OpacTopissue => C4::Context->preference("OpacTopissue"), + OpacAuthorities => C4::Context->preference("OpacAuthorities"), + OpacBrowser => C4::Context->preference("OpacBrowser"), + TagsEnabled => C4::Context->preference("TagsEnabled"), OPACUserJS => C4::Context->preference("OPACUserJS"), OPACUserCSS => C4::Context->preference("OPACUserCSS"), intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 8020c7aaa1..dab2e97ea7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -292,7 +292,7 @@
Click to edit - +
@@ -300,7 +300,7 @@
Click to edit - +
@@ -504,7 +504,6 @@ [% Asset.js("js/admin-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] - [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %] [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %] [% Asset.js( "lib/codemirror/css.min.js" ) | $raw %] [% Asset.js( "lib/codemirror/javascript.min.js" ) | $raw %] @@ -520,7 +519,6 @@ [% Asset.js( "lib/codemirror/css-lint.min.js" ) | $raw %] [% Asset.js( "lib/codemirror/yaml-lint.min.js" ) | $raw %] [% Asset.css("lib/codemirror/codemirror.css") | $raw %] - [% INCLUDE 'str/tinymce_i18n.inc' %] [% END %] +[% IF Branches.GetBranchSpecificCSS( Branches.GetLoggedInBranchcode() || default_branch) %] + +[% END %] [% IF ( Koha.Preference('SelfCheckInUserCSS') ) %][% END %]