3 # Copyright 2006 Katipo Communications
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 with
17 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
18 # Suite 330, Boston, MA 02111-1307 USA
23 use C4::Output; # contains gettemplate
24 use C4::Interface::CGI::Output;
31 # find the script that called the online help using the CGI referer()
33 my $refer = $query->referer();
34 # workaround for popup not functioning correctly in IE
35 my $referurl = $query->param('url');
37 $refer = $query->param('url');
40 $refer =~ /.*koha\/(.*)\.pl.*/;
41 my $from = "help/$1.tmpl";
43 my $template = gethelptemplate($from,"intranet");
45 output_html_with_http_headers $query, "", $template->output;
52 $htdocs = C4::Context->config('intrahtdocs');
53 my ($theme, $lang) = themelanguage($htdocs, $tmplbase, "intranet");
54 unless (-e "$htdocs/$theme/$lang/$tmplbase") {
55 $tmplbase="help/nohelp.tmpl";
56 ($theme, $lang) = themelanguage($htdocs, $tmplbase, "intranet");
58 my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase",
59 die_on_bad_params => 0,
61 path => ["$htdocs/$theme/$lang/includes"]);
63 # XXX temporary patch for Bug 182 for themelang
64 $template->param(themelang => '/intranet-tmpl' . "/$theme/$lang",
65 interface => '/intranet-tmpl',