Fix icon_image size and provide a CSS class for theming

fixes #11032
This commit is contained in:
Eric Lippmann 2016-02-27 21:57:02 +01:00
parent 16cc5e333a
commit dc0359f5b2
2 changed files with 17 additions and 8 deletions

View File

@ -27,13 +27,14 @@ class Zend_View_Helper_IconImage extends Zend_View_Helper_Abstract
public function host($object) public function host($object)
{ {
if ($object->host_icon_image && ! preg_match('/[\'"]/', $object->host_icon_image)) { if ($object->host_icon_image && ! preg_match('/[\'"]/', $object->host_icon_image)) {
return $this->view->icon( return $this->view->img(
Macro::resolveMacros($object->host_icon_image, $object), Macro::resolveMacros($object->host_icon_image, $object),
null, null,
array( array(
'alt' => $object->host_icon_image_alt, 'alt' => $object->host_icon_image_alt,
'title' => $object->host_icon_image_alt, 'data-tooltip-delay' => 0,
'data-tooltip-delay' => 0 'class' => 'host-icon-image',
'title' => $object->host_icon_image_alt
) )
); );
} }
@ -49,13 +50,14 @@ class Zend_View_Helper_IconImage extends Zend_View_Helper_Abstract
public function service($object) public function service($object)
{ {
if ($object->service_icon_image && ! preg_match('/[\'"]/', $object->service_icon_image)) { if ($object->service_icon_image && ! preg_match('/[\'"]/', $object->service_icon_image)) {
return $this->view->icon( return $this->view->img(
Macro::resolveMacros($object->service_icon_image, $object), Macro::resolveMacros($object->service_icon_image, $object),
null, null,
array( array(
'alt' => $object->service_icon_image_alt, 'alt' => $object->service_icon_image_alt,
'title' => $object->service_icon_image_alt, 'class' => 'service-icon-image',
'data-tooltip-delay' => 0 'data-tooltip-delay' => 0,
'title' => $object->service_icon_image_alt
) )
); );
} }

View File

@ -2,6 +2,13 @@
@border-left-width: 6px; @border-left-width: 6px;
// Icon images in list and detail views
.host-icon-image,
.service-icon-image {
max-width: 2em;
vertical-align: middle;
}
// Check source reachable information in the host and service detail views // Check source reachable information in the host and service detail views
.check-source-meta { .check-source-meta {
font-size: @font-size-small; font-size: @font-size-small;