Skip to content

Commit

Permalink
Provie link to detail view in downtime partial
Browse files Browse the repository at this point in the history
refs #8902
  • Loading branch information
majentsch committed May 7, 2015
1 parent be56674 commit a46dece
Showing 1 changed file with 14 additions and 4 deletions.
Expand Up @@ -47,12 +47,15 @@ foreach ($object->downtimes as $downtime) {
) : $this->escape($downtime->comment);

if ((bool) $downtime->is_in_effect) {
$state = 'in downtime since ' . $this->timeSince($downtime->start);
$state = 'in downtime since ';
$time = $this->timeSince($downtime->start);
} else {
if ((bool) $downtime->is_fixed) {
$state = 'scheduled ' . $this->timeUntil($downtime->start);
$state = 'scheduled ';
$time = $this->timeUntil($downtime->start);
} else {
$state = 'scheduled flexible ' . $this->timeUntil($downtime->start);
$state = 'scheduled flexible ';
$time = $this->timeUntil($downtime->start);
}
}

Expand All @@ -65,7 +68,14 @@ foreach ($object->downtimes as $downtime) {
$delDowntimeForm->populate(array('downtime_id' => $downtime->id));
echo $delDowntimeForm;
} ?>
<span class="sr-only"><?= $this->translate('Downtime'); ?></span><?= $state; ?> - <?= str_replace(array('\r\n', '\n'), '<br>', $commentText); ?>
<span class="sr-only"><?= $this->translate('Downtime'); ?></span>
<?=
$this->qlink(
$state,
'monitoring/downtime/show',
array('downtime_id' => $downtime->id),
array('data-base-target' => '_next')
) . $time ; ?> - <?= str_replace(array('\r\n', '\n'), '<br>', $commentText); ?>
</td>
</tr>
<?php } // endforeach ?>

0 comments on commit a46dece

Please sign in to comment.