From de074342de0bdc3604a0610a0c5f9cce5338bb85 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 24 Sep 2023 18:19:17 +0200 Subject: add support for HAFAS connection suggestions; drop manual destination list Still TODO: handle stations that have several EVAs --- templates/departures.html.ep | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'templates/departures.html.ep') diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 3a2516f..021e9ca 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -72,12 +72,17 @@ % } -% elsif (not param('train') and my @connections = @{stash('connections') // []}) { +% elsif (not param('train') and (@{stash('connections_iris') // []} or @{stash('connections_hafas') // []}) ) { % $have_connections = 1;

Häufig genutzte Verbindungen – Fahrt auswählen zum Einchecken mit Zielwahl

- %= include '_connections', connections => \@connections, checkin_from => $eva; + % if (@{stash('connections_iris') // []}) { + %= include '_connections', connections => stash('connections_iris'), checkin_from => $eva; + % } + % if (@{stash('connections_hafas') // []}) { + %= include '_connections_hafas', connections => stash('connections_hafas'), checkin_from => $eva; + % }
% } -- cgit v1.2.3