components/comments.phtml: Use base target _next only for comment links

This commit is contained in:
Johannes Meyer 2022-02-07 14:47:03 +01:00
parent 4ce8fc820e
commit 28a8771a37

View File

@ -39,14 +39,14 @@ if (empty($object->comments) && ! $addLink) {
echo '<br>' . $addLink; echo '<br>' . $addLink;
} }
?></th> ?></th>
<td data-base-target="_next"> <td data-base-target="_self">
<?php if (empty($object->comments)): <?php if (empty($object->comments)):
echo $addLink; echo $addLink;
else: ?> else: ?>
<dl class="comment-list"> <dl class="comment-list">
<?php foreach ($object->comments as $comment): ?> <?php foreach ($object->comments as $comment): ?>
<dt> <dt>
<a href="<?= $this->href('monitoring/comment/show', array('comment_id' => $comment->id)) ?>"> <a data-base-target="_next" href="<?= $this->href('monitoring/comment/show', array('comment_id' => $comment->id)) ?>">
<?= $this->escape($comment->author) ?> <?= $this->escape($comment->author) ?>
<span class="comment-time"> <span class="comment-time">
<?= $this->translate('commented') ?> <?= $this->translate('commented') ?>
@ -59,6 +59,7 @@ if (empty($object->comments) && ! $addLink) {
) ?> ) ?>
<?php endif ?> <?php endif ?>
</span> </span>
</a>
<?= $comment->persistent ? $this->icon('attach', 'This comment is persistent.') : '' ?> <?= $comment->persistent ? $this->icon('attach', 'This comment is persistent.') : '' ?>
<?php if (isset($delCommentForm)) { <?php if (isset($delCommentForm)) {
// Form is unset if the current user lacks the respective permission // Form is unset if the current user lacks the respective permission
@ -74,7 +75,6 @@ if (empty($object->comments) && ! $addLink) {
); );
echo $deleteButton; echo $deleteButton;
} ?> } ?>
</a>
</dt> </dt>
<dd> <dd>
<?= $this->nl2br($this->createTicketLinks($this->markdownLine($comment->comment, [ 'class' => 'caption']))) ?> <?= $this->nl2br($this->createTicketLinks($this->markdownLine($comment->comment, [ 'class' => 'caption']))) ?>