about: Fix documentation link and use a version dependent one
This commit is contained in:
parent
c7510db632
commit
3c48d693ff
|
@ -80,7 +80,8 @@ use ipl\Web\Widget\Icon;
|
|||
<div class="col">
|
||||
<?=
|
||||
HtmlElement::create('a', [
|
||||
'href' => 'https://github.com/icinga/icingaweb2/issues',
|
||||
'href' => 'https://icinga.com/docs/icinga-web-2/'
|
||||
. (isset($version['docVersion']) ? $version['docVersion'] : 'latest'),
|
||||
'target' => '_blank',
|
||||
'title' => $this->translate('Icinga Documentation')
|
||||
], [
|
||||
|
|
|
@ -18,6 +18,9 @@ class Version
|
|||
public static function get()
|
||||
{
|
||||
$version = array('appVersion' => self::VERSION);
|
||||
preg_match('/2.(\d+)\./', self::VERSION, $matches);
|
||||
$version['docVersion'] = isset($matches[1]) ? '2.' . $matches[1] : null;
|
||||
|
||||
if (false !== ($appVersion = @file_get_contents(Icinga::app()->getApplicationDir('VERSION')))) {
|
||||
$matches = array();
|
||||
if (@preg_match('/^(?P<gitCommitID>\w+) (?P<gitCommitDate>\S+)/', $appVersion, $matches)) {
|
||||
|
|
Loading…
Reference in New Issue