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
1 changed files with 15 additions and 12 deletions

View File

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