mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
helpers/icon: allow for img urls outside of icons
Icon images where restricted to img/icons, this did not allow modules to use custom images. Left behaviour for img urls without slash untouched.
This commit is contained in:
parent
d6283f1451
commit
270520eac3
@ -87,7 +87,11 @@ $this->addHelperFunction('icon', function ($img, $title = null, array $propertie
|
|||||||
$properties['class'] = 'icon';
|
$properties['class'] = 'icon';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $view->img('img/icons/' . $img, $properties);
|
if (strpos($img, '/') === false) {
|
||||||
|
return $view->img('img/icons/' . $img, $properties);
|
||||||
|
} else {
|
||||||
|
return $view->img($img, $properties);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ariaHidden = array_key_exists('aria-hidden', $properties) ? $properties['aria-hidden'] : null;
|
$ariaHidden = array_key_exists('aria-hidden', $properties) ? $properties['aria-hidden'] : null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user