diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-07-18 11:35:12 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-07-18 11:35:12 +0200 |
commit | 9f8379ef9e60d925a8356a3f0db992806dac4af4 (patch) | |
tree | 75124fdfdac943e0f201b271e7f8314ba8711c95 /templates | |
parent | ad30b7bb175d3a2a94676430b96f21ace4b356b0 (diff) |
train_details: Do not show expected utilization for cancelled trains
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_train_details.html.ep | 24 |
1 files changed, 13 insertions, 11 deletions
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 @@ % } </div> -% if (my $u = $departure->{utilization}) { - <div class="verbose"> -% my ($text, $icon1, $icon2) = utilization_icon($u); - <%= $text %><span style="padding-right: 0.5em;">.</span> 1. <i class="material-icons" aria-hidden="true" style="padding-right: 0.5em; vertical-align: bottom;"><%= $icon1 %></i> 2. <i class="material-icons" aria-hidden="true" style="vertical-align: bottom;"><%= $icon2 %></i> - </div> -% } -% elsif (my $o = $departure->{occupancy}) { - <div class="verbose"> -% my ($text, $icon) = occupancy_icon($o); - <%= $text %><span style="padding-right: 0.5em;">.</span> <i class="material-icons" aria-hidden="true" style="padding-right: 0.5em; vertical-align: bottom;"><%= $icon %></i></i> - </div> +% if (not $departure->{departure_is_cancelled}) { +% if (my $u = $departure->{utilization}) { + <div class="verbose"> +% my ($text, $icon1, $icon2) = utilization_icon($u); + <%= $text %><span style="padding-right: 0.5em;">.</span> 1. <i class="material-icons" aria-hidden="true" style="padding-right: 0.5em; vertical-align: bottom;"><%= $icon1 %></i> 2. <i class="material-icons" aria-hidden="true" style="vertical-align: bottom;"><%= $icon2 %></i> + </div> +% } +% elsif (my $o = $departure->{occupancy}) { + <div class="verbose"> +% my ($text, $icon) = occupancy_icon($o); + <%= $text %><span style="padding-right: 0.5em;">.</span> <i class="material-icons" aria-hidden="true" style="padding-right: 0.5em; vertical-align: bottom;"><%= $icon %></i></i> + </div> +% } % } % if ($departure->{moreinfo} and @{$departure->{moreinfo}}) { |