From c3c7a0c78b30cc7ef2b836cca4eb0a4e110955da Mon Sep 17 00:00:00 2001 From: Derf Null Date: Mon, 27 Mar 2023 21:03:25 +0200 Subject: stationboard: add HAFAS support --- templates/departures.html.ep | 58 +++++--------------------------------------- 1 file changed, 6 insertions(+), 52 deletions(-) (limited to 'templates/departures.html.ep') diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 25e752a..857be74 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -63,58 +63,12 @@ und maximal 120 Minuten nach Abfahrt möglich. % }

- - - % my $orientation_bar_shown = param('train'); - % my $now_epoch = now()->epoch; - % for my $result (@{$results}) { - % my $td_class = ''; - % my $link_class = 'action-checkin'; - % if ($result->departure_is_cancelled) { - % $td_class = "cancelled"; - % $link_class = 'action-cancelled-from'; - % } - % if (not $orientation_bar_shown and $result->departure->epoch < $now_epoch) { - % $orientation_bar_shown = 1; - - - - - - % } - - - - - - % } - -
- - — Anfragezeitpunkt — - -
+ % if ($hafas) { + %= include '_departures_hafas', results => $results; + % } + % else { + %= include '_departures_iris', results => $results; + % } -- cgit v1.2.3