monitoring: Use dl for inline comments in the host and service detail

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-25 10:58:45 +02:00
parent 7910cee2f1
commit 7b66a61a41

View File

@ -43,11 +43,13 @@ if (empty($object->comments) && ! $addLink) {
<?php if (empty($object->comments)): <?php if (empty($object->comments)):
echo $addLink; echo $addLink;
else: ?> else: ?>
<ul class="inline-comments"> <dl class="feed-list">
<?php foreach ($object->comments as $comment): <?php foreach ($object->comments as $comment):
// Form is unset if the current user lacks the respective permission // Form is unset if the current user lacks the respective permission
if (isset($delCommentForm)) { if (isset($delCommentForm)) {
$deleteButton = clone($delCommentForm); $deleteButton = clone($delCommentForm);
/** @var \Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm $deleteButton */
$deleteButton->setAttrib('class', $deleteButton->getAttrib('class') . ' pull-right');
$deleteButton->populate( $deleteButton->populate(
array( array(
'comment_id' => $comment->id, 'comment_id' => $comment->id,
@ -58,19 +60,20 @@ if (empty($object->comments) && ! $addLink) {
$deleteButton = ''; $deleteButton = '';
} }
?> ?>
<li class="comment-item"> <dt class="feed-author">
<h3> <?= $this->escape($comment->author) ?>
<span class="author"><?= $this->escape($comment->author) ?></span> <?= $this->timeAgo($comment->timestamp) ?>
<?= $this->timeAgo($comment->timestamp) ?> <?php if ($deleteButton): ?>
<span class="clearfix">
<?= $deleteButton ?> <?= $deleteButton ?>
</h3> </span>
<p> <?php endif ?>
<span class="sr-only">(<?= $this->translate('Comment') ?>): </span> </dt>
<?= str_replace(array('\r\n', '\n'), '<br>', $this->createTicketLinks($comment->comment)) ?> <dd>
</p> <?= str_replace(array('\r\n', '\n'), '<br>', $this->createTicketLinks($comment->comment)) ?>
</li> </dd>
<?php endforeach ?> <?php endforeach ?>
</ul> </dl>
<?php endif ?> <?php endif ?>
</td> </td>
</tr> </tr>