Bugzilla – Attachment 188485 Details for
Bug 21266
Missing doc-head-close and cssinclude in sco-main.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21266: Added missing doc-head-close and cssinclude to sco-main.tt
Bug-21266-Added-missing-doc-head-close-and-cssincl.patch (text/plain), 10.61 KB, created by
Owen Leonard
on 2025-10-27 18:17:41 UTC
(
hide
)
Description:
Bug 21266: Added missing doc-head-close and cssinclude to sco-main.tt
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-10-27 18:17:41 UTC
Size:
10.61 KB
patch
obsolete
>From ab693d87969a941dd7f27e49214b7df087c24204 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 27 Oct 2025 18:09:55 +0000 >Subject: [PATCH] Bug 21266: Added missing doc-head-close and cssinclude to > sco-main.tt > >This is a re-implementation of the previous patch set with additional >de-duplication of markup. The patch also removes some redunancy from >sco.scss and makes a few minor changes to markup to bring the templates >in better alignment with the OPAC. > >Test plan: >1. Add a custom opac theme stylesheet in OpacAdditionalStylesheet > syspref > >2. Also ensure you have set the syspref: WebBasedSelfCheck to 'Enable' > and use a patron with the self_check_permissions, and enable > AutoSelfCheckAllowed syspref and write in the username and password > of the aforementioned user into the AutoSelfCheckID and > AuoSelfCheckPass sysprefs > >3. Go to the self checkout page and notice the OPAC > theme is not being applied to the self check interface. > >4. Apply patch and rebuild the OPAC CSS. > >5. Refresh the page and notice the custom theme is being applied. > >6. Perform the same test with the SCOUserCSS preference. > >Sponsored-By: Central Agencies (Treasury), New Zealand >Sponsored-by: Athens County Public Libraries >--- > .../opac-tmpl/bootstrap/css/src/sco.scss | 8 --- > .../bootstrap/en/includes/masthead-sco.inc | 13 ++-- > .../bootstrap/en/includes/masthead.inc | 2 +- > .../bootstrap/en/modules/sco/help.tt | 63 ++++++------------- > .../bootstrap/en/modules/sco/sco-main.tt | 53 +++------------- > opac/sco/help.pl | 5 -- > 6 files changed, 37 insertions(+), 107 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/sco.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/sco.scss >index 64e6063397e..7294f11c668 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/sco.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/sco.scss >@@ -1,9 +1,3 @@ >-@import "common"; >- >-body { >- background-color: #FCF9FC; >-} >- > a { > color: $sci-link-color; > >@@ -77,5 +71,3 @@ a { > margin-top: 1rem; > padding-top: 1rem; > } >- >-@import "responsive"; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc >index 624dcc4b196..44760a8942a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc >@@ -7,7 +7,7 @@ > > <header id="header-region" class="noprint"> > <nav class="navbar navbar-expand"> >- <h1 id="logo"> >+ <div id="logo"> > <a class="navbar-brand" href="/cgi-bin/koha/sco/sco-main.pl"> > [% IF ( LibraryNameTitle ) %] > [% LibraryNameTitle | html %] >@@ -15,13 +15,14 @@ > Koha online > [% END %] > </a> >- </h1> >+ </div> > >- <ul class="navbar-nav ml-auto"> >- [% IF ( Koha.Preference( 'opaclanguagesdisplay' ) ) %] >- <li class="nav-item"> [% INCLUDE 'langmenu.inc' %] </li> >- [% END # / IF opaclanguagedisplay %] >+ [% IF ( Koha.Preference( 'opaclanguagesdisplay' ) && ( ! one_language_enabled ) && ( languages_loop ) && ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'top') ) %] >+ [% context = "header" %] >+ [% INCLUDE 'langmenu.inc' %] >+ [% END %] > >+ <ul class="navbar-nav ml-auto"> > <li class="nav-item"> > <ul class="navbar-nav"> > <li class="nav-item"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index c136dfeb29a..f637eaea4a7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -121,7 +121,7 @@ > [% END # /IF OpacPublic %] > [% IF Koha.Preference( 'opacuserlogin' ) == 1 || Koha.Preference( 'EnableOpacSearchHistory') || Koha.Preference( 'opaclanguagesdisplay' ) %] > [%# Following on one line for translatability %] >- [% IF ( ( opaclanguagesdisplay ) && ( ! one_language_enabled ) && ( languages_loop ) && ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'top') ) %] >+ [% IF ( Koha.Preference( 'opaclanguagesdisplay' ) && ( ! one_language_enabled ) && ( languages_loop ) && ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'top') ) %] > [% context = "header" %] > [% INCLUDE 'langmenu.inc' %] > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt >index b930c847e08..f392d2d53c8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt >@@ -7,42 +7,17 @@ > [% INCLUDE 'doc-head-open.inc' %] > [% SET SelfCheckHelpMessage = AdditionalContents.get( location => "SelfCheckHelpMessage", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > <title>Self-checkout help › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha[% END %]</title> >-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >-<meta name="generator" content="Koha" /> >-<!-- leave this for stats --> >-<link rel="shortcut icon" href="[% IF ( Koha.Preference('OpacFavicon') ) %][% Koha.Preference('OpacFavicon') | url %][% ELSE %][% interface | html %]/[% theme | html %]/images/favicon.ico[% END %]" type="image/x-icon" /> >-[% 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 %] >-[% Asset.css("css/sco.css") | $raw %] >-[% IF ( Koha.Preference('OPACUserCSS') ) %] >- <!-- prettier-ignore-start --> >- <style>[% Koha.Preference('OPACUserCSS') | $raw %]</style> >- <!-- prettier-ignore-end --> >-[% END %] >-[% IF Branches.GetBranchSpecificCSS( Branches.GetLoggedInBranchcode() || default_branch) %] >- <!-- prettier-ignore-start --> >- <style> >- [% Branches.GetBranchSpecificCSS( Branches.GetLoggedInBranchcode() || default_branch) | $raw %] >- </style> >- <!-- prettier-ignore-end --> >-[% END %] >-[% IF ( SCOUserCSS ) %] >- <!-- prettier-ignore-start --> >- <style>[% SCOUserCSS | $raw %]</style> >- <!-- prettier-ignore-end --> >-[% END %] >-<script> >- var Koha = {}; >- function _(s) { >- return s; >- } // dummy function for gettext >-</script> >-[% IF lang && lang != 'en' %] >- [% Asset.js(lang _ '/js/locale_data.js') | $raw %] >-[% END %] >-[% Asset.js('js/Gettext.js') | $raw %] >-[% Asset.js('js/i18n.js') | $raw %] >+[% INCLUDE 'doc-head-close.inc' %] >+[% BLOCK cssinclude %] >+ [% SET SCOUserCSS = Koha.Preference('SCOUserCSS') %] >+ [% IF ( SCOUserCSS ) %] >+ <!-- SCOUserCSS --> >+ <!-- prettier-ignore-start --> >+ <style>[% SCOUserCSS | $raw %]</style> >+ <!-- prettier-ignore-end --> >+ [% Asset.css("css/sco.css") | $raw %] >+ [% END %] >+[% END %]] > </head> > <body id="sco_help" class="sco"> > <div id="wrapper"> >@@ -88,13 +63,13 @@ > <!-- / .container-fluid --> > </main> > <!-- / .main --> >-</div> > >-[% INCLUDE 'opac-bottom.inc' %] >-[% BLOCK jsinclude %] >- [% IF ( SCOUserJS ) %] >- <script> >- [% SCOUserJS | $raw %] >- </script> >+ [% INCLUDE 'opac-bottom.inc' %] >+ [% BLOCK jsinclude %] >+ [% IF ( SCOUserJS ) %] >+ <script> >+ [% SCOUserJS | $raw %] >+ </script> >+ [% END %] > [% END %] >-[% END %] >+</div> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index ad3dc1ab1bf..83a67b13765 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -11,50 +11,17 @@ > [% PROCESS 'html_helpers.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Self-checkout › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha[% END %]</title> >-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >-<meta name="generator" content="Koha" /> >-<!-- leave this for stats --> >-[% IF ( Koha.Preference('OpacFavicon') ) %] >- <link rel="shortcut icon" href="[% Koha.Preference('OpacFavicon') | url %]" type="image/x-icon" /> >-[% ELSE %] >- <link rel="shortcut icon" href="[% interface | html %]/[% theme | html %]/images/favicon.ico" type="image/x-icon" /> >-[% 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') ) %] >- <!-- prettier-ignore-start --> >- <style>[% Koha.Preference('OPACUserCSS') | $raw %]</style> >- <!-- prettier-ignore-end --> >-[% END %] >-[% IF Branches.GetBranchSpecificCSS( Branches.GetLoggedInBranchcode() || default_branch) %] >- <!-- prettier-ignore-start --> >- <style> >- [% Branches.GetBranchSpecificCSS( Branches.GetLoggedInBranchcode() || default_branch) | $raw %] >- </style> >- <!-- prettier-ignore-end --> >-[% END %] >-[% IF ( Koha.Preference('SCOUserCSS') ) %] >- <!-- prettier-ignore-start --> >- <style>[% Koha.Preference('SCOUserCSS') | $raw %]</style> >- <!-- prettier-ignore-end --> >-[% END %] >-<script> >- var Koha = {}; >- function _(s) { >- return s; >- } // dummy function for gettext >-</script> >-[% IF lang && lang != 'en' %] >- [% Asset.js(lang _ '/js/locale_data.js') | $raw %] >+[% INCLUDE 'doc-head-close.inc' %] >+[% BLOCK cssinclude %] >+ [% SET SCOUserCSS = Koha.Preference('SCOUserCSS') %] >+ [% IF ( SCOUserCSS ) %] >+ <!-- prettier-ignore-start --> >+ <!-- SCOUserCSS --> >+ <style>[% SCOUserCSS | $raw %]</style> >+ <!-- prettier-ignore-end --> >+ [% Asset.css("css/sco.css") | $raw %] >+ [% END %] > [% END %] >-[% Asset.js('js/Gettext.js') | $raw %] >-[% Asset.js('js/i18n.js') | $raw %] > </head> > <body id="sco_main" class="sco"> > <div id="wrapper"> >diff --git a/opac/sco/help.pl b/opac/sco/help.pl >index e8c38d4b544..bab198bd989 100755 >--- a/opac/sco/help.pl >+++ b/opac/sco/help.pl >@@ -51,10 +51,5 @@ if ( C4::Context->preference('SelfCheckTimeout') ) { > > $template->param( SelfCheckTimeout => $selfchecktimeout ); > >-$template->param( >- SCOUserJS => C4::Context->preference('SCOUserJS'), >- SCOUserCSS => C4::Context->preference('SCOUserCSS'), >-); >- > output_html_with_http_headers $query, $cookie, $template->output; > >-- >2.39.5
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 21266
:
78103
|
84860
|
85201
|
85202
|
117217
|
117218
|
117219
|
132276
|
132277
|
132278
| 188485