summaryrefslogtreecommitdiff
path: root/templates/departures.html.ep
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-09-24 18:19:17 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-09-24 18:19:17 +0200
commitde074342de0bdc3604a0610a0c5f9cce5338bb85 (patch)
tree721c6c7415945ca57779e51db5dde00e136a62c2 /templates/departures.html.ep
parent8810acf742629294713448408ab6f0719f17952f (diff)
add support for HAFAS connection suggestions; drop manual destination list
Still TODO: handle stations that have several EVAs
Diffstat (limited to 'templates/departures.html.ep')
-rw-r--r--templates/departures.html.ep9
1 files changed, 7 insertions, 2 deletions
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 @@
</div>
</div>
% }
-% elsif (not param('train') and my @connections = @{stash('connections') // []}) {
+% elsif (not param('train') and (@{stash('connections_iris') // []} or @{stash('connections_hafas') // []}) ) {
% $have_connections = 1;
<div class="row">
<div class="col s12">
<p>Häufig genutzte Verbindungen – Fahrt auswählen zum Einchecken mit Zielwahl</p>
- %= 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;
+ % }
</div>
</div>
% }