From 5169e23b54f3310560fa589bcd87d8c3611daa28 Mon Sep 17 00:00:00 2001 From: wolfpac444 Date: Tue, 13 May 2003 05:10:07 +0000 Subject: [PATCH] Fixed theme/language templating in intranet. --- C4/Output.pm | 20 +++++++++++++------ koha-tmpl/opac-tmpl/default/en/opac-user.tmpl | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/C4/Output.pm b/C4/Output.pm index daeed45d34..edda350eaf 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -88,7 +88,7 @@ sub gettemplate { $htdocs = C4::Context->config('intrahtdocs'); } - my ($theme, $lang) = themelanguage($htdocs, $tmplbase); + my ($theme, $lang) = themelanguage($htdocs, $tmplbase, $opac); my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase", die_on_bad_params => 0, @@ -106,13 +106,21 @@ sub gettemplate { #--------------------------------------------------------------------------------------------------------- # FIXME - POD sub themelanguage { - my ($htdocs, $tmpl) = @_; + my ($htdocs, $tmpl, $section) = @_; my $dbh = C4::Context->dbh; - my @languages = split " ", C4::Context->preference("opaclanguages"); - # language preference - my @themes = split " ", C4::Context->preference("opacthemes"); - # theme preferences + my @languages; + my @themes; + if ( $section eq "intranet") + { + @languages = split " ", C4::Context->preference("opaclanguages"); + @themes = split " ", C4::Context->preference("template"); + } + else + { + @languages = split " ", C4::Context->preference("opaclanguages"); + @themes = split " ", C4::Context->preference("opacthemes"); + } my ($theme, $lang); # searches through the themes and languages. First template it find it returns. diff --git a/koha-tmpl/opac-tmpl/default/en/opac-user.tmpl b/koha-tmpl/opac-tmpl/default/en/opac-user.tmpl index 451b651d08..aa05202134 100644 --- a/koha-tmpl/opac-tmpl/default/en/opac-user.tmpl +++ b/koha-tmpl/opac-tmpl/default/en/opac-user.tmpl @@ -31,7 +31,7 @@ Are any of our records incorrect? Have you moved recently, got a new phone numbe
-You have Outstanding charges and fines of +You have outstanding charges and fines of
@@ -39,7 +39,7 @@ Are any of our records incorrect? Have you moved recently, got a new phone numbe -
You have Outstanding charges and fines of +You have outstanding charges and fines of
-- 2.39.2