monitoring: Use View::nl2br() and new comment-list style in the comment overview

refs #10603
This commit is contained in:
Eric Lippmann 2015-11-20 15:18:29 +01:00
parent 91e576d530
commit 24d43899a7

View File

@ -1,6 +1,7 @@
<div class="comment-header">
<?php if ($comment->objecttype === 'service'): ?>
<?= $this->icon('service', $this->translate('Service')) ?> <?= $this->qlink(
<div class="comment-author">
<?php if ($comment->objecttype === 'service') {
echo $this->icon('service', $this->translate('Service'));
echo $this->qlink(
$comment->host_display_name . ': ' . $comment->service_display_name,
'monitoring/service/show',
array(
@ -14,9 +15,10 @@
$comment->host_display_name
)
)
) ?>
<?php else: ?>
<?= $this->icon('host', $this->translate('Host')) ?> <?= $this->qlink(
);
} else {
echo $this->icon('host', $this->translate('Host'));
echo $this->qlink(
$comment->host_display_name,
'monitoring/host/show',
array('host' => $comment->host_name),
@ -26,13 +28,14 @@
$comment->host_display_name
)
)
) ?>
<?php endif ?>
<span class="comment-meta">
);
} ?>
<span class="comment-time">
<?= $this->translate('by') ?>
<?= $this->escape($comment->author) ?>
<?= $this->timeAgo($comment->timestamp) ?>
<span class="meta-icons" data-base-target="_self">
</span>
<span class="comment-icons" data-base-target="_self">
<?= $comment->persistent ? $this->icon('attach', 'This comment is persistent.') : '' ?>
<?= $comment->expiration ? $this->icon('clock', sprintf(
$this->translate('This comment expires %s.'),
@ -51,8 +54,7 @@
echo $deleteButton;
} ?>
</span>
</span>
</div>
<p class="comment-text">
<?= $this->escape($comment->comment) ?>
<?= $this->nl2br($this->escape($comment->comment)) ?>
</p>