monitoring: Update comment-list styles in components/comments.phtml

This commit is contained in:
Eric Lippmann 2015-11-20 15:46:08 +01:00
parent a874a2cb2e
commit 2c5defed5b

View File

@ -45,14 +45,15 @@ if (empty($object->comments) && ! $addLink) {
else: ?> else: ?>
<dl class="comment-list"> <dl class="comment-list">
<?php foreach ($object->comments as $comment): ?> <?php foreach ($object->comments as $comment): ?>
<dt class="comment-header"> <dt>
<?= $this->escape($comment->author) ?> <?= $this->escape($comment->author) ?>
<span class="comment-meta"> <span class="comment-time">
<?= $this->translate('commented') ?> <?= $this->translate('commented') ?>
<?= $this->timeAgo($comment->timestamp) ?> <?= $this->timeAgo($comment->timestamp) ?>
<?php if (isset($delCommentForm)): // Form is unset if the current user lacks the respective permission ?> </span>
<span class="meta-icons"> <?= $comment->persistent ? $this->icon('attach', 'This comment is persistent.') : '' ?>
<?php <?php if (isset($delCommentForm)) {
// Form is unset if the current user lacks the respective permission
$deleteButton = clone($delCommentForm); $deleteButton = clone($delCommentForm);
/** @var \Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm $deleteButton */ /** @var \Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm $deleteButton */
$deleteButton->setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action'); $deleteButton->setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action');
@ -63,13 +64,10 @@ if (empty($object->comments) && ! $addLink) {
) )
); );
echo $deleteButton; echo $deleteButton;
?> } ?>
</span>
<?php endif ?>
</span>
</dt> </dt>
<dd class="comment-text"> <dd>
<p><?= nl2br($this->createTicketLinks($this->escape($comment->comment)), false) ?></p> <?= nl2br($this->createTicketLinks($this->escape($comment->comment)), false) ?>
</dd> </dd>
<?php endforeach ?> <?php endforeach ?>
</dl> </dl>