From b1591eed543b355cf30d77c6b9ec886fc5eb79b4 Mon Sep 17 00:00:00 2001
From: Daniel Friesel
Date: Fri, 31 May 2019 20:18:22 +0200
Subject: show current/next stop while checked in
---
templates/_public_status_card.html.ep | 48 +++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
(limited to 'templates/_public_status_card.html.ep')
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index ebf989b..510bf52 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -70,8 +70,56 @@
noch nicht bekannt
% }
+
+ % for my $station (@{$journey->{route_after}}) {
+ % if ($station->[0] eq $journey->{arr_name}) {
+ % last;
+ % }
+ % if (($station->[1]{rt_arr_countdown} // 0) > 0) {
+ <%= $station->[0] %>
<%= $station->[1]{rt_arr}->strftime('%H:%M') %>
+ % if ($station->[1]{sched_arr}->epoch != $station->[1]{rt_arr}->epoch) {
+ %= sprintf('(%+d)', ($station->[1]{rt_arr}->epoch - $station->[1]{sched_arr}->epoch ) / 60);
+ % }
+ % last;
+ % }
+ % if (($station->[1]{rt_dep_countdown} // 0) > 0) {
+ <%= $station->[0] %>
+ <%= $station->[1]{rt_arr}->strftime('%H:%M') %> →
+ <%= $station->[1]{rt_dep}->strftime('%H:%M') %>
+ % if ($station->[1]{sched_dep}->epoch != $station->[1]{rt_dep}->epoch) {
+ %= sprintf('(%+d)', ($station->[1]{rt_dep}->epoch - $station->[1]{sched_dep}->epoch ) / 60);
+ % }
+ % last;
+ % }
+ % }
+
+
+ % for my $station (@{$journey->{route_after}}) {
+ % if ($station->[0] eq $journey->{arr_name}) {
+ % last;
+ % }
+ % if (($station->[1]{rt_arr_countdown} // 0) > 0) {
+ Nächster Halt:
+ <%= $station->[0] %>
<%= $station->[1]{rt_arr}->strftime('%H:%M') %>
+ % if ($station->[1]{sched_arr}->epoch != $station->[1]{rt_arr}->epoch) {
+ %= sprintf('(%+d)', ($station->[1]{rt_arr}->epoch - $station->[1]{sched_arr}->epoch ) / 60);
+ % }
+ % last;
+ % }
+ % if (($station->[1]{rt_dep_countdown} // 0) > 0) {
+ Aktueller Halt:
+ <%= $station->[0] %>
+ <%= $station->[1]{rt_arr}->strftime('%H:%M') %> →
+ <%= $station->[1]{rt_dep}->strftime('%H:%M') %>
+ % if ($station->[1]{sched_dep}->epoch != $station->[1]{rt_dep}->epoch) {
+ %= sprintf('(%+d)', ($station->[1]{rt_dep}->epoch - $station->[1]{sched_dep}->epoch ) / 60);
+ % }
+ % last;
+ % }
+ % }
+
% if (@{$journey->{messages} // []} > 0 and $journey->{messages}[0]) {
--
cgit v1.2.3