From 1401fb64bf2a77129afed307d99c384fa6e26a33 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 5 Oct 2023 06:59:06 +0200 Subject: [PATCH] also render entry-only stops in backend --- templates/_checked_in.html.ep | 8 +++++--- templates/_public_status_card.html.ep | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 2300ddd..a629ee3 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -134,10 +134,12 @@ % } % last; % } - % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{arr} and $station->[2]{dep}) { + % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{dep}) { <%= $station->[0] %>
- <%= $station->[2]{arr}->strftime('%H:%M') %> → - <%= $station->[2]{dep}->strftime('%H:%M') %> + % if ($station->[2]{arr}) { + <%= $station->[2]{arr}->strftime('%H:%M') %> → + % } + %= $station->[2]{dep}->strftime('%H:%M') % if ($station->[2]{dep_delay}) { %= sprintf('(%+d)', $station->[2]{dep_dely} / 60); % } diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep index 055e15a..b463d15 100644 --- a/templates/_public_status_card.html.ep +++ b/templates/_public_status_card.html.ep @@ -98,10 +98,12 @@ % } % last; % } - % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{arr} and $station->[2]{dep}) { + % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{dep}) { <%= $station->[0] %>
- <%= $station->[2]{arr}->strftime('%H:%M') %> → - <%= $station->[2]{dep}->strftime('%H:%M') %> + % if ($station->[2]{arr}) { + <%= $station->[2]{arr}->strftime('%H:%M') %> → + % } + %= $station->[2]{dep}->strftime('%H:%M') % if ($station->[2]{dep_delay}) { %= sprintf('(%+d)', $station->[2]{dep_delay} / 60); % }