From 8a72e6bd98f15c2d9ad6d91eb9a160ce4e53d565 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 7 Feb 2019 22:03:54 +0000 Subject: [PATCH] Bug 21266: (follow-up) Removing duplicate lines and moving code around Removing duplicates lines from sco-main.tt that are already in doc-head-close.inc. Also moving JS code into the jsinclude block and moving CSS code into the cssinclude block. Same fixes applied to sco/help.tt Signed-off-by: Charles Farmer --- .../opac-tmpl/bootstrap/en/modules/sco/help.tt | 23 +++++++------- .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 35 ++++++++-------------- 2 files changed, 22 insertions(+), 36 deletions(-) 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 c0a1376eff..26f38c62fa 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt @@ -4,18 +4,12 @@ [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] › Self checkout help - - - -[% Asset.css("lib/jquery/jquery-ui-1.12.1.css") | $raw %] -[% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %] -[% Asset.css("css/sco.css") | $raw %] -[% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] -[% IF ( SCOUserCSS ) %][% END %] - -[% Asset.js("lib/modernizr.min.js") | $raw %] +[% INCLUDE 'doc-head-close.inc' %] +[% BLOCK cssinclude %] + [% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] + [% IF ( Koha.Preference('SCOUserCSS') ) %][% END %] + [% Asset.css("css/sco.css") | $raw %] +[% END %] [% INCLUDE 'masthead-sco.inc' %] @@ -63,5 +57,8 @@ [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] - [% IF ( SCOUserJS ) %][% END %] + [% IF ( Koha.Preference('SCOUserJS') ) %][% END %] + [% END %] 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 44588ae46c..16c5452792 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 @@ -1,4 +1,4 @@ - [% USE raw %] +[% USE raw %] [% USE Asset %] [% USE Koha %] [% USE KohaDates %] @@ -7,29 +7,16 @@ [% USE Price %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] › Self checkout - - -[% IF ( Koha.Preference('OpacFavicon') ) %] - -[% ELSE %] - -[% END %] -[% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %] -[% IF ( bidi ) %] - [% Asset.css("lib/jquery/jquery-ui-rtl-1.12.1.min.css") | $raw %] - [% Asset.css("css/sco-rtl.css") | $raw %] -[% ELSE %] - [% Asset.css("lib/jquery/jquery-ui-1.12.1.css") | $raw %] - [% Asset.css("css/sco.css") | $raw %] -[% END %] -[% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] -[% IF ( Koha.Preference('SCOUserCSS') ) %][% END %] - -[% Asset.js("lib/modernizr.min.js") | $raw %] [% INCLUDE 'doc-head-close.inc' %] -[% BLOCK cssinclude %][% END %] +[% BLOCK cssinclude %] + [% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] + [% IF ( Koha.Preference('SCOUserCSS') ) %][% END %] + [% IF ( bidi ) %] + [% Asset.css("css/sco-rtl.css") | $raw %] + [% ELSE %] + [% Asset.css("css/sco.css") | $raw %] + [% END %] +[% END %] [% INCLUDE 'masthead-sco.inc' %] @@ -428,6 +415,8 @@ [% BLOCK jsinclude %] [% INCLUDE 'datatables.inc' %]