Provie link to detail view in downtime partial

refs #8902
This commit is contained in:
Matthias Jentsch 2015-04-30 16:30:04 +02:00
parent be566746a9
commit a46dece136
1 changed files with 14 additions and 4 deletions

View File

@ -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);
}
}
@ -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 ?>