downtimes overview: Fix detail links

This commit is contained in:
Johannes Meyer 2015-07-13 12:17:00 +02:00
parent 3db81a8d0f
commit c90da0378d
1 changed files with 28 additions and 19 deletions

View File

@ -46,25 +46,34 @@ if (count($downtimes) === 0) {
<?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?>
</td>
<td>
<?php
if ($isService) {
echo $this->icon('service');
} else {
echo $this->icon('host');
}
?>
<?= $this->qlink(
sprintf('%s: %s', $downtime->host_display_name, $downtime->service_display_name),
'monitoring/downtime/show',
array('downtime_id' => $downtime->id),
array(
'title' => sprintf(
$this->translate('Show detailed information for downtime on %s for %s'),
$downtime->service_display_name,
$downtime->host_display_name
),
'class' => 'rowaction'
)) ?>
<?php if ($isService): ?>
<?= $this->icon('service', $this->translate('Service')); ?> <?= $this->qlink(
$this->escape($downtime->host_display_name) . ': ' . $this->escape($downtime->service_display_name),
'monitoring/downtime/show',
array('downtime_id' => $downtime->id),
array(
'title' => sprintf(
$this->translate('Show this downtime\'s details for service %s on host %s'),
$downtime->service_display_name,
$downtime->host_display_name
),
'class' => 'rowaction'
)
); ?>
<?php else: ?>
<?= $this->icon('host', $this->translate('host')); ?> <?= $this->qlink(
$this->escape($downtime->host_display_name),
'monitoring/downtime/show',
array('downtime_id' => $downtime->id),
array(
'title' => sprintf(
$this->translate('Show this donwtime\'s details for host %s'),
$downtime->host_display_name
),
'class' => 'rowaction'
)
); ?>
<?php endif ?>
<br>
<?= $this->icon('comment', $this->translate('Comment')); ?> [<?= $this->escape($downtime->author_name) ?>] <?= $this->escape($downtime->comment) ?>
<br>