Always show downtime schedule times
This commit is contained in:
parent
1351be7da8
commit
ba6b8c04ec
|
@ -1,10 +1,10 @@
|
|||
<td class="state-col state-<?= $stateName; ?><?= $downtime->is_in_effect ? ' handled' : ''; ?>">
|
||||
<?php if ($downtime->start <= time() && ! $downtime->is_in_effect): ?>
|
||||
<div class="state-label"><?= $this->translate('ENDS', 'Downtime status'); ?></div>
|
||||
<div class="state-meta"><?= $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, $this->compact) ?></div>
|
||||
<div class="state-meta"><?= $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, $this->compact, true) ?></div>
|
||||
<?php else: ?>
|
||||
<div class="state-label"><?= $downtime->is_in_effect ? $this->translate('EXPIRES', 'Downtime status') : $this->translate('STARTS', 'Downtime status'); ?></div>
|
||||
<div class="state-meta"><?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?></div>
|
||||
<div class="state-meta"><?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact, true) ?></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -47,7 +47,7 @@
|
|||
)) ?>
|
||||
</span>
|
||||
<?php if (! $downtime->is_in_effect && $downtime->start >= time()): ?>
|
||||
<span><?= sprintf($this->translate('expires %s'), $this->timeUntil($downtime->end)) ?></span>
|
||||
<span><?= sprintf($this->translate('expires %s'), $this->timeUntil($downtime->end, false, true)) ?></span>
|
||||
<?php endif ?>
|
||||
<span class="comment-icons">
|
||||
<?php if ($downtime->is_flexible): ?>
|
||||
|
|
|
@ -64,17 +64,17 @@ if (empty($object->comments) && ! $addLink) {
|
|||
if ((bool) $downtime->is_fixed) {
|
||||
$state = sprintf(
|
||||
$this->translate('scheduled %s', 'Last format parameter represents the time scheduled'),
|
||||
$this->timeUntil($downtime->start)
|
||||
$this->timeUntil($downtime->start, false, true)
|
||||
);
|
||||
} else {
|
||||
$state = sprintf(
|
||||
$this->translate('scheduled flexible %s', 'Last format parameter represents the time scheduled'),
|
||||
$this->timeUntil($downtime->start)
|
||||
$this->timeUntil($downtime->start, false, true)
|
||||
);
|
||||
}
|
||||
$state .= ' ' . sprintf(
|
||||
$this->translate('expires %s', 'Last format parameter represents the downtime expire time'),
|
||||
$this->timeUntil($downtime->end)
|
||||
$this->timeUntil($downtime->end, false, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue