From 9793bd52c7033995d635eefb2617330bcef12348 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 23 Feb 2015 17:27:13 +0100 Subject: [PATCH] Add proper titles to the comments component view refs #8458 --- .../scripts/show/components/comments.phtml | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) 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') ?> - - + } ?>