Fix links in comment view

Let the host and service link in the comment list always point to the host and service object while the row action itself opens the comment.
This commit is contained in:
Matthias Jentsch 2015-10-01 14:24:21 +02:00
parent cb81916a2c
commit 03ab6e4e92
2 changed files with 10 additions and 9 deletions

View File

@ -26,7 +26,7 @@
data-icinga-multiselect-data="comment_id">
<tbody>
<?php foreach ($comments->peekAhead($this->compact) as $comment): ?>
<tr>
<tr href="<?= $this->href('monitoring/comment/show', array('comment_id' => $comment->id)) ?>">
<td class="icon-col">
<?= $this->partial('partials/comment/comment-description.phtml', array('comment' => $comment)); ?>
</td>

View File

@ -2,28 +2,29 @@
<?php if ($comment->objecttype === 'service'): ?>
<?= $this->icon('service', $this->translate('Service')) ?> <?= $this->qlink(
$this->escape($comment->host_display_name) . ': ' . $this->escape($comment->service_display_name),
'monitoring/comment/show',
array('comment_id' => $comment->id),
'monitoring/service/show',
array(
'host' => $comment->host_name,
'service' => $comment->service_description
),
array(
'title' => sprintf(
$this->translate('Show detailed information for this comment about service %s on host %s'),
$comment->service_display_name,
$comment->host_display_name
),
'class' => 'rowaction'
)
)
) ?>
<?php else: ?>
<?= $this->icon('host', $this->translate('Host')) ?> <?= $this->qlink(
$this->escape($comment->host_display_name),
'monitoring/comment/show',
array('comment_id' => $comment->id),
'monitoring/host/show',
array('host' => $comment->host_name),
array(
'title' => sprintf(
$this->translate('Show detailed information for this comment about host %s'),
$comment->host_display_name
),
'class' => 'rowaction'
)
)
) ?>
<?php endif ?>