mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
monitoring: Update comment-list styles in components/comments.phtml
This commit is contained in:
parent
a874a2cb2e
commit
2c5defed5b
@ -45,31 +45,29 @@ 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 class="meta-icons">
|
|
||||||
<?php
|
|
||||||
$deleteButton = clone($delCommentForm);
|
|
||||||
/** @var \Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm $deleteButton */
|
|
||||||
$deleteButton->setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action');
|
|
||||||
$deleteButton->populate(
|
|
||||||
array(
|
|
||||||
'comment_id' => $comment->id,
|
|
||||||
'comment_is_service' => isset($comment->service_description)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
echo $deleteButton;
|
|
||||||
?>
|
|
||||||
</span>
|
|
||||||
<?php endif ?>
|
|
||||||
</span>
|
</span>
|
||||||
|
<?= $comment->persistent ? $this->icon('attach', 'This comment is persistent.') : '' ?>
|
||||||
|
<?php if (isset($delCommentForm)) {
|
||||||
|
// Form is unset if the current user lacks the respective permission
|
||||||
|
$deleteButton = clone($delCommentForm);
|
||||||
|
/** @var \Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm $deleteButton */
|
||||||
|
$deleteButton->setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action');
|
||||||
|
$deleteButton->populate(
|
||||||
|
array(
|
||||||
|
'comment_id' => $comment->id,
|
||||||
|
'comment_is_service' => isset($comment->service_description)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo $deleteButton;
|
||||||
|
} ?>
|
||||||
</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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user