mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
monitoring: Use createTicketLinks helper when showing comments of an object
refs #9611
This commit is contained in:
parent
e555e3e3b2
commit
b6caeb6c17
@ -52,16 +52,8 @@ if (empty($object->comments) && ! $addLink) {
|
|||||||
<?php foreach ($object->comments as $comment): ?>
|
<?php foreach ($object->comments as $comment): ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Ticket hook sample
|
|
||||||
$commentText = $this->tickets ? preg_replace_callback(
|
|
||||||
$this->tickets->getPattern(),
|
|
||||||
array($this->tickets, 'createLink'),
|
|
||||||
$this->escape($comment->comment)
|
|
||||||
) : $this->escape($comment->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);
|
||||||
$deleteButton->populate(
|
$deleteButton->populate(
|
||||||
array(
|
array(
|
||||||
@ -80,7 +72,7 @@ if (isset($delCommentForm)) {
|
|||||||
<?= $this->timeAgo($comment->timestamp) ?>
|
<?= $this->timeAgo($comment->timestamp) ?>
|
||||||
<?= $deleteButton ?>
|
<?= $deleteButton ?>
|
||||||
</h3>
|
</h3>
|
||||||
<p><span class="sr-only">(<?= $this->translate('Comment'); ?>): </span><?= str_replace(array('\r\n', '\n'), '<br>', $commentText) ?></p>
|
<p><span class="sr-only">(<?= $this->translate('Comment'); ?>): </span><?= str_replace(array('\r\n', '\n'), '<br>', $this->createTicketLinks($comment->comment)) ?></p>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user