From 806cb2707b3588c9189c5b512ab22541d2556d1e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 28 Mar 2013 11:40:52 +0100 Subject: [PATCH] Bug 9850: Build the version for the manual link Signed-off-by: Chris Cormack I like this idea, it is a much nicer way of doing it, I'll leave it to the QA and RM to decide --- help.pl | 9 +++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/help.pl b/help.pl index f641fe6..77db917 100755 --- a/help.pl +++ b/help.pl @@ -57,4 +57,13 @@ unless ( -e "$htdocs/$theme/$lang/modules/$from" ) { my $template = C4::Templates::gettemplate($from, 'intranet', $query); $template->param( referer => $refer ); +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; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt index 8385320..67db69b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/about.tt @@ -20,6 +20,6 @@

Koha is developed and supported by a large number of developers around the world. Thanks to all the developers and libraries who support Koha

-

See the full documentation for the About page in the manual (online).

+

See the full documentation for the About page in the manual (online).

-[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +[% INCLUDE 'help-bottom.inc' %] -- 1.7.10.4