From 1dc04eb45ad9d7208cbfa1d7eb046861ff43e0c2 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 20 May 2019 19:15:21 +0200 Subject: show journey suggestions on departure board as well --- templates/departures.html.ep | 61 +++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 23 deletions(-) (limited to 'templates/departures.html.ep') diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 3c9638e..7e98d9c 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -1,7 +1,13 @@
-
- % my $status = $self->get_user_status; - % if ($status->{checked_in}) { +
+ %= $station +
+
+% my $status = $self->get_user_status; +% my $have_connections = 0; +% if ($status->{checked_in}) { +
+
Aktuell eingecheckt @@ -14,31 +20,40 @@
- % } - % elsif ($status->{timestamp_delta} < 180) { +
+
+% } +% elsif ($status->{timestamp_delta} < 180) { +
+
%= include '_checked_out', journey => $status; - % } +
-
+% } +% elsif (not param('train') and my @connections = get_connecting_trains(ds100 => $ds100)) { + % $have_connections = 1; +
+
+

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

+ %= include '_connections', connections => \@connections, checkin_from => $ds100; +
+
+% }
- %= $station - % if (@{$results}) { - – Zug auswählen zum Einchecken. - % } - % else { - – Keine Abfahrten gefunden. Ein Checkin ist frühestens 30 Minuten vor - und maximal 120 Minuten nach Abfahrt möglich. - % } -
+

+ % if ($have_connections) { + Alle Abfahrten – + % } + % if (@{$results}) { + Zug auswählen zum Einchecken. + % } + % else { + Keine Abfahrten gefunden. Ein Checkin ist frühestens 30 Minuten vor + und maximal 120 Minuten nach Abfahrt möglich. + % } +

- - - - - - - % for my $result (@{$results}) { % my $td_class = ''; -- cgit v1.2.3
ZugAbfahrt