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
22 use C4::Output; # contains gettemplate
31 # find the script that called the online help using the CGI referer()
33 my $refer = $query->referer();
35 # workaround for popup not functioning correctly in IE
36 my $referurl = $query->param('url');
38 $refer = $query->param('url');
41 $refer =~ /.*koha\/(.*)\.pl.*/;
42 my $from = "help/$1.tmpl";
44 my $template = gethelptemplate( $from, "intranet" );
47 output_html_with_http_headers $query, "", $template->output;
53 $htdocs = C4::Context->config('intrahtdocs');
54 my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet" );
55 unless ( -e "$htdocs/$theme/$lang/$tmplbase" ) {
56 $tmplbase = "help/nohelp.tmpl";
57 ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet" );
59 my $template = HTML::Template->new(
60 filename => "$htdocs/$theme/$lang/$tmplbase",
61 die_on_bad_params => 0,
63 path => ["$htdocs/$theme/$lang/includes"]
66 # XXX temporary patch for Bug 182 for themelang
68 themelang => '/intranet-tmpl' . "/$theme/$lang",
69 interface => '/intranet-tmpl',