From 70855acfea86c663f1258488294bb6542a9d5567 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 15 Apr 2013 13:01:45 +0200 Subject: [PATCH] Bug 10052 Followup for edithelp.tt and help-top.inc A grep on the stylesheet names revealed that similar code was used in those template files. This patch moves the code from doc-head-close.inc to a new include file. Now, doc-head-close and the help templates refer to that one file. Test plan: If you tested the preceding two patches, now you only need to: 1) Check included css via page source in browser from staff main page. 2) Check it also from some other location. 3) Check again from Help: e.g. /cgi-bin/koha/help.pl 4) Check again from Edit Help: /cgi-bin/koha/edithelp.pl Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Template only, no string changes. Tested according to test plan. Signed-off-by: Galen Charlton --- .../prog/en/includes/doc-head-close.inc | 16 +--------------- .../intranet-tmpl/prog/en/includes/help-top.inc | 10 +--------- .../prog/en/includes/intranetstylesheet.inc | 15 +++++++++++++++ .../prog/en/modules/help/edithelp.tt | 9 +-------- 4 files changed, 18 insertions(+), 32 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/intranetstylesheet.inc 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 2def80dfcd..8db3b2a912 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 @@ -3,12 +3,7 @@ -[% SET intranetstylesheet='staff-global.css' UNLESS intranetstylesheet %] -[% IF (intranetstylesheet.match('^https?:|^\/')) %] - -[% ELSE %] - -[% END %] +[% INCLUDE intranetstylesheet.inc %] [% IF ( bidi ) %] [% END %] @@ -28,15 +23,6 @@ [% END %] - -[% IF ( intranetcolorstylesheet ) %] - [% IF (intranetcolorstylesheet.match('^https?:|^\/')) %] - - [% ELSE %] - - [% END %] -[% END %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc index 72acc21909..a530854cd5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc @@ -4,21 +4,13 @@ -[% IF ( intranetstylesheet ) %] - -[% ELSE %] - -[% END %] +[% INCLUDE intranetstylesheet.inc %] [% IF ( bidi ) %] [% END %] - -[% IF ( intranetcolorstylesheet ) %] - -[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranetstylesheet.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranetstylesheet.inc new file mode 100644 index 0000000000..8c5af963ab --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranetstylesheet.inc @@ -0,0 +1,15 @@ +[% SET intranetstylesheet='staff-global.css' UNLESS intranetstylesheet %] +[% IF (intranetstylesheet.match('^https?:|^\/')) %] + +[% ELSE %] + +[% END %] + + +[% IF ( intranetcolorstylesheet ) %] + [% IF (intranetcolorstylesheet.match('^https?:|^\/')) %] + + [% ELSE %] + + [% END %] +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tt index fd274a260d..734bf0d045 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tt @@ -21,14 +21,7 @@ tinyMCE.init({ }); //]]> -[% IF ( intranetstylesheet ) %] - -[% ELSE %] - -[% END %] -[% IF ( intranetcolorstylesheet ) %] - -[% END %] +[% INCLUDE intranetstylesheet.inc %] -- 2.39.5