From 13ea68aa5d25e00218ad1c1658daff8e159f9d21 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 30 Oct 2025 16:10:30 +0000 Subject: [PATCH] Bug 41113: Missing doc-head-close and cssinclude in sci-main.tt This patch makes changes to the self checkin template in order to replace inline markup with doc-head-close.inc. A cssinclude BLOCK is added for the inclusion of SelfCheckInUserCSS. To test you must have the SelfCheckInModule system preference enabled. - In the staff client, add a link to a custom stylesheet in the OpacAdditionalStylesheet system preference. For example: https://static.myacpl.org/public/css/test.css - Go to the self-checkin page and confirm that the page background is now blue. - Empty the OpacAdditionalStylesheet preference and add custom CSS to the SelfCheckInUserCSS preference. - Reload the self checkin page to confirm that your CSS has been applied. Sponsored-by: Athens County Public Libraries --- .../bootstrap/en/modules/sci/sci-main.tt | 57 ++++--------------- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt index db3333f9603..8396b7c89cb 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt @@ -21,57 +21,20 @@ [% END %] [% END %] [% PROCESS 'html_helpers.inc' %] -[% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET SelfCheckInMainUserBlock = AdditionalContents.get( location => "SelfCheckInMainUserBlock", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] -[% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] Self check-in › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha[% END %] - - - - - -[% IF ( Koha.Preference('OpacFavicon') ) %] - -[% ELSE %] - -[% END %] -[% Asset.css("lib/fontawesome/css/fontawesome.min.css") | $raw %] -[% Asset.css("lib/fontawesome/css/brands.min.css") | $raw %] -[% Asset.css("lib/fontawesome/css/solid.min.css") | $raw %] -[% IF ( bidi ) %] - [% Asset.css("css/sco-rtl.css") | $raw %] -[% ELSE %] - [% Asset.css("css/sco.css") | $raw %] -[% END %] -[% IF ( Koha.Preference('OPACUserCSS') ) %] - - - -[% END %] -[% IF Branches.GetBranchSpecificCSS( Branches.GetLoggedInBranchcode() || default_branch) %] - - - -[% END %] -[% IF ( Koha.Preference('SelfCheckInUserCSS') ) %] - - - -[% END %] - -[% IF lang && lang != 'en' %] - [% Asset.js(lang _ '/js/locale_data.js') | $raw %] +[% INCLUDE 'doc-head-close.inc' %] +[% BLOCK cssinclude %] + [% SET SelfCheckInUserCSS = Koha.Preference('SelfCheckInUserCSS') %] + [% IF ( SelfCheckInUserCSS ) %] + + + + + [% Asset.css("css/sco.css") | $raw %] + [% END %] [% END %] -[% Asset.js('js/Gettext.js') | $raw %] -[% Asset.js('js/i18n.js') | $raw %] [% INCLUDE 'masthead-sci.inc' %] -- 2.39.5