KRT-4338 -- create barcode and stocknumber when receiving items in acq
[koha.git] / help.pl
diff --git a/help.pl b/help.pl
index f641fe6..7d4385d 100755 (executable)
--- a/help.pl
+++ b/help.pl
@@ -23,7 +23,7 @@ use C4::Templates;
 use C4::Output;
 # use C4::Auth;
 use C4::Context;
-use CGI;
+use CGI qw ( -utf8 );
 
 sub _help_template_file_of_url {
     my $url = shift;
@@ -55,6 +55,19 @@ unless ( -e "$htdocs/$theme/$lang/modules/$from" ) {
 }
 
 my $template = C4::Templates::gettemplate($from, 'intranet', $query);
-$template->param( referer => $refer );
+$template->param(
+    referer => $refer,
+    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+    intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+);
+
+my $help_version = C4::Context->preference("Version");
+if ( $help_version =~ m|^(\d+)\.(\d{2}).*$| ) {
+    my $version = $1;
+    my $major = $2;
+    if ( $major % 2 ) { $major-- };
+    $help_version = "$version.$major";
+}
+$template->param( helpVersion => $help_version );
 
 output_html_with_http_headers $query, "", $template->output;