mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 08:14:03 +02:00
monitoring: Style ack and comments in the host and service detail views
refs #5543
This commit is contained in:
parent
d6774a0f64
commit
9efdc149d8
@ -1,4 +1,4 @@
|
|||||||
<?php
|
modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml<?php
|
||||||
|
|
||||||
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||||
|
|
||||||
@ -15,44 +15,39 @@ if ($object->acknowledged): ?>
|
|||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Acknowledged') ?></th>
|
<th><?= $this->translate('Acknowledged') ?></th>
|
||||||
<td data-base-target="_self">
|
<td data-base-target="_self">
|
||||||
<ul class="inline-comments">
|
<dl class="feed-list">
|
||||||
<li class="comment-item">
|
<dt class="feed-author clearfix">
|
||||||
<h3>
|
<?= $this->escape($acknowledgement->getAuthor()) ?>
|
||||||
<?= sprintf(
|
<span class="text-small"><?= $this->translate('acknowledged') ?></span>
|
||||||
$this->translate('%s acknowledged %s'),
|
<?= $this->timeAgo($acknowledgement->getEntryTime()) ?>
|
||||||
'<span class="author">' . $this->escape($acknowledgement->getAuthor()) . '</span>',
|
<?php
|
||||||
$this->timeAgo($acknowledgement->getEntryTime())
|
if ($acknowledgement->getSticky()) {
|
||||||
) ?>
|
echo $this->icon('pin', sprintf(
|
||||||
<?php
|
$this->translate(
|
||||||
if ($acknowledgement->getSticky()) {
|
'Acknowledgement remains until the %1$s recovers even if the %1$s changes state'
|
||||||
echo $this->icon('pin', sprintf(
|
),
|
||||||
$this->translate(
|
$object->getType(true)
|
||||||
'Acknowledgement remains until the %1$s recovers even if the %1$s changes state'
|
));
|
||||||
),
|
}
|
||||||
$object->getType(true)
|
if (isset($removeAckForm)) {
|
||||||
));
|
$removeAckForm->setAttrib('class', $removeAckForm->getAttrib('class') . ' pull-right');
|
||||||
}
|
// Form is unset if the current user lacks the respective permission
|
||||||
if (isset($removeAckForm)) {
|
echo $removeAckForm;
|
||||||
// Form is unset if the current user lacks the respective permission
|
}
|
||||||
// Form is unset if the current user lacks the respective permission
|
?>
|
||||||
echo $removeAckForm;
|
</dt>
|
||||||
}
|
<dd class="comment-text">
|
||||||
?>
|
<?= nl2br($this->createTicketLinks($acknowledgement->getComment()), false) ?>
|
||||||
</h3>
|
</dd>
|
||||||
<p>
|
<?php if ($acknowledgement->expires()): ?>
|
||||||
<span class="sr-only">(<?= $this->translate('Comment') ?>): </span>
|
<dd>
|
||||||
<?= nl2br($this->createTicketLinks($acknowledgement->getComment()), false) ?>
|
<?= sprintf(
|
||||||
</p>
|
$this->translate('Expires %s'),
|
||||||
<?php if ($acknowledgement->expires()): ?>
|
$this->timeUntil($acknowledgement->getExpirationTime())
|
||||||
<p class="info">
|
) ?>
|
||||||
<?= sprintf(
|
</dd>
|
||||||
$this->translate('Expires %s'),
|
<?php endif ?>
|
||||||
$this->timeUntil($acknowledgement->getExpirationTime())
|
</dl>
|
||||||
) ?>
|
|
||||||
</p>
|
|
||||||
<?php endif ?>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
@ -60,16 +60,15 @@ if (empty($object->comments) && ! $addLink) {
|
|||||||
$deleteButton = '';
|
$deleteButton = '';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<dt class="feed-author">
|
<dt class="feed-author clearfix">
|
||||||
<?= $this->escape($comment->author) ?>
|
<?= $this->escape($comment->author) ?>
|
||||||
|
<span class="text-small"><?= $this->translate('commented') ?></span>
|
||||||
<?= $this->timeAgo($comment->timestamp) ?>
|
<?= $this->timeAgo($comment->timestamp) ?>
|
||||||
<?php if ($deleteButton): ?>
|
<?php if ($deleteButton): ?>
|
||||||
<span class="clearfix">
|
|
||||||
<?= $deleteButton ?>
|
<?= $deleteButton ?>
|
||||||
</span>
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd class="comment-text">
|
||||||
<?= str_replace(array('\r\n', '\n'), '<br>', $this->createTicketLinks($comment->comment)) ?>
|
<?= str_replace(array('\r\n', '\n'), '<br>', $this->createTicketLinks($comment->comment)) ?>
|
||||||
</dd>
|
</dd>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user