Skip to content

Commit

Permalink
monitoring: Use dl for inline comments in the host and service detail
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Sep 25, 2015
1 parent 7910cee commit 7b66a61
Showing 1 changed file with 15 additions and 12 deletions.
Expand Up @@ -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,
Expand All @@ -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>

0 comments on commit 7b66a61

Please sign in to comment.