3 # Copyright 2010 Koha Development team
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 use HTML
::Template
::Pro
;
23 use C4
::Output
; # contains gettemplate
30 # find the script that called the online help using the CGI referer()
31 our $refer = $query->referer();
33 # workaround for popup not functioning correctly in IE
34 my $referurl = $query->param('url');
36 $refer = $query->param('url');
39 $refer =~ /.*koha\/(.*)\
.pl
.*/;
40 my $from = "modules/help/$1.tmpl";
42 my $template = gethelptemplate
( $from, "intranet" );
45 output_html_with_http_headers
$query, "", $template->output;
51 $htdocs = C4
::Context
->config('intrahtdocs');
52 my ( $theme, $lang ) = themelanguage
( $htdocs, $tmplbase, "intranet", $query );
53 unless ( -e
"$htdocs/$theme/$lang/$tmplbase" ) {
54 $tmplbase = "modules/help/nohelp.tmpl";
55 ( $theme, $lang ) = themelanguage
( $htdocs, $tmplbase, "intranet", $query );
57 my $template = HTML
::Template
::Pro
->new(
58 filename
=> "$htdocs/$theme/$lang/$tmplbase",
59 die_on_bad_params
=> 0,
61 path
=> ["$htdocs/$theme/$lang/includes"]
64 # XXX temporary patch for Bug 182 for themelang
66 themelang
=> '/intranet-tmpl' . "/$theme/$lang",
67 interface
=> '/intranet-tmpl',
70 intranetcolorstylesheet
=>
71 C4
::Context
->preference("intranetcolorstylesheet"),
72 intranetstylesheet
=> C4
::Context
->preference("intranetstylesheet"),
73 IntranetNav
=> C4
::Context
->preference("IntranetNav"),
74 yuipath
=> (C4
::Context
->preference("yuipath") eq "local"?
"/intranet-tmpl/$theme/$lang/lib/yui":C4
::Context
->preference("yuipath")),