From 8e5a8fad931052cc50f3f0ec404b480a8e7fcd18 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 7 Jul 2019 08:10:05 +0200 Subject: [PATCH] indicate whether a connecting train is cancelled or not --- templates/_connections.html.ep | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/templates/_connections.html.ep b/templates/_connections.html.ep index 2506829..cd9edc3 100644 --- a/templates/_connections.html.ep +++ b/templates/_connections.html.ep @@ -29,18 +29,24 @@
% for my $res (@{$connections}) { % my ($train, $via) = @{$res}; + % my $td_class = ''; + % my $link_class = 'action-checkin'; + % if ($train->departure_is_cancelled) { + % $td_class = 'cancelled'; + % $link_class = 'action-cancelled-from'; + % } - -
+ % if ($checkin_from) { - <%= $train->line %> + <%= $train->line %> % } % else { %= $train->line % } + % if ($checkin_from) { - <%= $via %> + <%= $via %> % } % else { %= $via