From 4f0fee7783d3919110287ee9edd0c3a86e961814 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 25 Nov 2019 21:18:57 +0100 Subject: show cancelled trains in connections list --- templates/_connections.html.ep | 49 +++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 12 deletions(-) (limited to 'templates/_connections.html.ep') diff --git a/templates/_connections.html.ep b/templates/_connections.html.ep index f1d8c2b..a30e896 100644 --- a/templates/_connections.html.ep +++ b/templates/_connections.html.ep @@ -1,28 +1,42 @@
% for my $res (@{$connections}) { % my ($train, $via) = @{$res}; + % my $td_class = ''; + % my $link_class = 'action-checkin'; + % if ($train->is_cancelled) { + % $td_class = 'cancelled'; + % $link_class = 'action-cancelled-from'; + % } - - - + % else { + %= $train->departure->strftime('%H:%M') + % if ($train->departure_delay) { + %= sprintf('(%+d)', $train->departure_delay) + % } +
Gleis <%= $train->platform || '?' %> + % } + % }
+ % if ($checkin_from) { - <%= $train->line %> + <%= $train->line %> % } % else { %= $train->line % } + % if ($checkin_from) { - <%= $via %> + <%= $via %> % } % else { %= $via % } <%= $train->departure->strftime('%H:%M') %> - % if ($train->departure_delay) { - %= sprintf('(%+d)', $train->departure_delay) + + % if ($train->departure_is_cancelled) { + %= $train->sched_departure->strftime('%H:%M') + ⊖ % } -
Gleis <%= $train->platform || '?' %>
@@ -52,11 +66,22 @@ %= $via % } - <%= $train->departure->strftime('%H:%M') %> - % if ($train->departure_delay) { - %= sprintf('(%+d)', $train->departure_delay) + + % if ($train->departure_is_cancelled) { + %= $train->sched_departure->strftime('%H:%M') + (fällt aus) + % } + % else { + %= $train->departure->strftime('%H:%M') + % if ($train->departure_delay) { + %= sprintf('(%+d)', $train->departure_delay) + % } % } - Gleis <%= $train->platform || '?' %> + + % if (not $train->departure_is_cancelled) { + Gleis <%= $train->platform || '?' %> + % } + % } -- cgit v1.2.3