From 23f229d88ac9fab6ff43982768aa589f0ad5c346 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 Content-Type: text/plain; charset=utf-8 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 --- .../prog/en/includes/doc-head-close.inc | 16 +--------------- .../intranet-tmpl/prog/en/includes/help-top.inc | 10 +--------- .../prog/en/includes/intranetstylesheet.inc | 15 +++++++++++++++ .../intranet-tmpl/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 2def80d..8db3b2a 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 72acc21..a530854 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 0000000..8c5af96 --- /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 fd274a2..734bf0d 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 %] -- 1.7.7.6