summaryrefslogtreecommitdiff
path: root/templates/_train_details.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-07-18 11:35:12 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-07-18 11:35:12 +0200
commit9f8379ef9e60d925a8356a3f0db992806dac4af4 (patch)
tree75124fdfdac943e0f201b271e7f8314ba8711c95 /templates/_train_details.html.ep
parentad30b7bb175d3a2a94676430b96f21ace4b356b0 (diff)
train_details: Do not show expected utilization for cancelled trains
Diffstat (limited to 'templates/_train_details.html.ep')
-rw-r--r--templates/_train_details.html.ep24
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}}) {