monitoring/detail: Display the comment of the ack next to the ack

refs #9674
This commit is contained in:
Eric Lippmann 2015-09-03 16:39:56 +02:00
parent f0e8340fbd
commit 2da49ad697
1 changed files with 23 additions and 5 deletions

View File

@ -8,14 +8,32 @@ if (in_array((int) $object->state, array(0, 99))) {
}
if ($object->acknowledged): ?>
<?php
$acknowledgement = $object->acknowledgement;
/** @var \Icinga\Module\Monitoring\Object\Acknowledgement $acknowledgement */
?>
<tr>
<th><?= $this->translate('Acknowledged') ?></th>
<td data-base-target="_self">
<?php if (isset($removeAckForm)) { // Form is unset if the current user lacks the respective permission
echo $removeAckForm;
} else {
echo '&#45;';
} ?>
<ul class="inline-comments">
<li class="comment-item">
<h3>
<?= sprintf(
$this->translate('%s acknowledged %s'),
'<span class="author">' . $this->escape($acknowledgement->getAuthor()) . '</span>',
$this->timeAgo($acknowledgement->getEntryTime())
) ?>
<?php if (isset($removeAckForm)) {
// Form is unset if the current user lacks the respective permission
echo $removeAckForm;
} ?>
</h3>
<p>
<span class="sr-only">(<?= $this->translate('Comment') ?>): </span>
<?= nl2br($this->createTicketLinks($acknowledgement->getComment()), false) ?>
</p>
</li>
</ul>
</td>
</tr>
<?php else: ?>