diff --git a/modules/monitoring/application/views/scripts/show/components/comments.phtml b/modules/monitoring/application/views/scripts/show/components/comments.phtml index a6503a70b..74da7d054 100644 --- a/modules/monitoring/application/views/scripts/show/components/comments.phtml +++ b/modules/monitoring/application/views/scripts/show/components/comments.phtml @@ -1,27 +1,34 @@ - translate('Comments') ?> + translate('Comments'); ?> hasPermission('monitoring/command/comment/add')) { /** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */ if ($object->getType() === $object::TYPE_HOST) { - $addCommentLink = $this->href( + echo $this->qlink( + $this->icon('comment') . ' ' . $this->translate('Add comment'), 'monitoring/host/add-comment', - array('host' => $object->getName()) + array('host' => $object->getName()), + array( + 'data-base-target' => '_self', + 'title' => $this->translate('Add a new comment to this host') + ), + false ); } else { - $addCommentLink = $this->href( + echo $this->qlink( + $this->icon('comment') . ' ' . $this->translate('Add comment'), 'monitoring/service/add-comment', - array('host' => $object->getHost()->getName(), 'service' => $object->getName()) + array('host' => $object->getHost()->getName(), 'service' => $object->getName()), + array( + 'data-base-target' => '_self', + 'title' => $this->translate('Add a new comment to this service') + ), + false ); } - ?> - - icon('comment') ?> - translate('Add comment') ?> - - + } ?>