From 9f8379ef9e60d925a8356a3f0db992806dac4af4 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 18 Jul 2021 11:35:12 +0200 Subject: train_details: Do not show expected utilization for cancelled trains --- templates/_train_details.html.ep | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'templates') diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index ab96c38..85aceb4 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -140,17 +140,19 @@ % } -% if (my $u = $departure->{utilization}) { -
-% my ($text, $icon1, $icon2) = utilization_icon($u); - <%= $text %>. 1. 2. -
-% } -% elsif (my $o = $departure->{occupancy}) { -
-% my ($text, $icon) = occupancy_icon($o); - <%= $text %>. -
+% if (not $departure->{departure_is_cancelled}) { +% if (my $u = $departure->{utilization}) { +
+% my ($text, $icon1, $icon2) = utilization_icon($u); + <%= $text %>. 1. 2. +
+% } +% elsif (my $o = $departure->{occupancy}) { +
+% my ($text, $icon) = occupancy_icon($o); + <%= $text %>. +
+% } % } % if ($departure->{moreinfo} and @{$departure->{moreinfo}}) { -- cgit v1.2.3