hasPermission('monitoring/command/comment/add')) { /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ if ($object->getType() === $object::TYPE_HOST) { $addLink = $this->qlink( $this->translate('Add comment'), 'monitoring/host/add-comment', array('host' => $object->getName()), array( 'class' => 'action-link', 'data-base-target' => '_self', 'icon' => 'comment', 'title' => $this->translate('Add a new comment to this host') ) ); } else { $addLink = $this->qlink( $this->translate('Add comment'), 'monitoring/service/add-comment', array('host' => $object->getHost()->getName(), 'service' => $object->getName()), array( 'class' => 'action-link', 'data-base-target' => '_self', 'icon' => 'comment', 'title' => $this->translate('Add a new comment to this service') ) ); } } if (empty($object->comments) && ! $addLink) { return; } ?> translate('Comments'); if (! empty($object->comments) && $addLink) { echo '
' . $addLink; } ?> comments)): echo $addLink; else: ?>
comments as $comment): ?>
escape($comment->author) ?> translate('commented') ?> timeAgo($comment->timestamp) ?> setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action'); $deleteButton->populate( array( 'comment_id' => $comment->id, 'comment_is_service' => isset($comment->service_description) ) ); echo $deleteButton; ?>

createTicketLinks($this->escape($comment->comment)), false) ?>