4 use HTML::Template::Pro;
6 use C4::Output; # contains gettemplate
13 # find the script that called the online help using the CGI referer()
14 our $refer = $query->referer();
16 # workaround for popup not functioning correctly in IE
17 my $referurl = $query->param('url');
19 $refer = $query->param('url');
22 $refer =~ /.*koha\/(.*)\.pl.*/;
23 my $from = "modules/help/$1.tmpl";
25 my $template = gethelptemplate( $from, "intranet" );
28 output_html_with_http_headers $query, "", $template->output;
34 $htdocs = C4::Context->config('intrahtdocs');
35 my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet", $query );
36 unless ( -e "$htdocs/$theme/$lang/$tmplbase" ) {
37 $tmplbase = "modules/help/nohelp.tmpl";
38 ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet", $query );
40 my $template = HTML::Template::Pro->new(
41 filename => "$htdocs/$theme/$lang/$tmplbase",
42 die_on_bad_params => 0,
44 path => ["$htdocs/$theme/$lang/includes"]
47 # XXX temporary patch for Bug 182 for themelang
49 themelang => '/intranet-tmpl' . "/$theme/$lang",
50 interface => '/intranet-tmpl',
53 intranetcolorstylesheet =>
54 C4::Context->preference("intranetcolorstylesheet"),
55 intranetstylesheet => C4::Context->preference("intranetstylesheet"),
56 IntranetNav => C4::Context->preference("IntranetNav"),
57 yuipath => (C4::Context->preference("yuipath") eq "local"?"/intranet-tmpl/$theme/$lang/lib/yui":C4::Context->preference("yuipath")),