From d0b89ba6d39c43788775593a107ae582039434da Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 19 Nov 2022 21:37:49 +0100 Subject: Handle missing arrival times in route (indicates 'entry only' stops) --- templates/_checked_in.html.ep | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'templates/_checked_in.html.ep') diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 2b6ac90..ec4e8ae 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -227,11 +227,11 @@ % if ($station->[2] and $station->[2] eq 'cancelled') { entfällt % } - % elsif ($station->[1]{rt_arr}) { - <%= $station->[1]{rt_arr}->strftime('%H:%M') %> + % elsif ($station->[1]{rt_arr} or $station->[1]{sched_arr}) { + %= ($station->[1]{rt_arr} || $station->[1]{sched_arr})->strftime('%H:%M') % } - % elsif ($station->[1]{sched_arr}) { - <%= $station->[1]{sched_arr}->strftime('%H:%M') %> + % elsif ($station->[1]{rt_dep} or $station->[1]{sched_dep}) { + (<%= ($station->[1]{rt_dep} || $station->[1]{sched_dep})->strftime('%H:%M') %>) % } % elsif ($station->[2] and $station->[2] eq 'additional') { Zusatzhalt @@ -342,11 +342,11 @@ % if ($station->[2] and $station->[2] eq 'cancelled') { entfällt % } - % elsif ($station->[1]{rt_arr}) { - <%= $station->[1]{rt_arr}->strftime('%H:%M') %> + % elsif ($station->[1]{rt_arr} or $station->[1]{sched_arr}) { + %= ($station->[1]{rt_arr} || $station->[1]{sched_arr})->strftime('%H:%M') % } - % elsif ($station->[1]{sched_arr}) { - <%= $station->[1]{sched_arr}->strftime('%H:%M') %> + % elsif ($station->[1]{rt_dep} or $station->[1]{sched_dep}) { + (<%= ($station->[1]{rt_dep} || $station->[1]{sched_dep})->strftime('%H:%M') %>) % } % elsif ($station->[2] and $station->[2] eq 'additional') { Zusatzhalt -- cgit v1.2.3