From a46dece13650902ee130391bc71002c7beb96098 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 30 Apr 2015 16:30:04 +0200 Subject: [PATCH] Provie link to detail view in downtime partial refs #8902 --- .../scripts/show/components/downtime.phtml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index b338f8a71a..bfb9bbf45b 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -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; } ?> - translate('Downtime'); ?> - ', $commentText); ?> + translate('Downtime'); ?> + qlink( + $state, + 'monitoring/downtime/show', + array('downtime_id' => $downtime->id), + array('data-base-target' => '_next') + ) . $time ; ?> - ', $commentText); ?>