summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-09-07 21:19:43 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-09-07 21:19:43 +0200
commit2e14c2e3e4dafa976cecab2721682553d90eb01e (patch)
tree51f786b0738b3aea957e5ac6c79433fe6d09bc23 /templates
parentb410176e634559bda0ff5d1628d45dc6ed3df5e3 (diff)
Fix intermediate stop display for journeys without real-time data, e.g. H-Bahn
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep36
-rw-r--r--templates/_public_status_card.html.ep36
2 files changed, 36 insertions, 36 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index 1377db4..e5e0baf 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -127,19 +127,19 @@
% if ($station->[0] eq $journey->{arr_name}) {
% last;
% }
- % if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) {
- <%= $station->[0] %><br/><%= $station->[2]{rt_arr}->strftime('%H:%M') %>
- % if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) {
- %= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60);
+ % if (($station->[2]{arr_countdown} // 0) > 0 and $station->[2]{arr}) {
+ <%= $station->[0] %><br/><%= $station->[2]{arr}->strftime('%H:%M') %>
+ % if ($station->[2]{arr_delay}) {
+ %= sprintf('(%+d)', $station->[2]{arr_delay} / 60);
% }
% last;
% }
- % if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) {
+ % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{arr} and $station->[2]{dep}) {
<%= $station->[0] %><br/>
- <%= $station->[2]{rt_arr}->strftime('%H:%M') %> →
- <%= $station->[2]{rt_dep}->strftime('%H:%M') %>
- % if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) {
- %= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60);
+ <%= $station->[2]{arr}->strftime('%H:%M') %> →
+ <%= $station->[2]{dep}->strftime('%H:%M') %>
+ % if ($station->[2]{dep_delay}) {
+ %= sprintf('(%+d)', $station->[2]{dep_dely} / 60);
% }
% last;
% }
@@ -152,19 +152,19 @@
% if ($station->[0] eq $journey->{arr_name}) {
% last;
% }
- % if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) {
- <%= $station->[0] %><br/><%= $station->[2]{rt_arr}->strftime('%H:%M') %>
- % if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) {
- %= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60);
+ % if (($station->[2]{arr_countdown} // 0) > 0 and $station->[2]{arr}) {
+ <%= $station->[0] %><br/><%= $station->[2]{arr}->strftime('%H:%M') %>
+ % if ($station->[2]{arr_delay}) {
+ %= sprintf('(%+d)', $station->[2]{arr_delay} / 60);
% }
% last;
% }
- % if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) {
+ % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{arr} and $station->[2]{dep}) {
<%= $station->[0] %><br/>
- <%= $station->[2]{rt_arr}->strftime('%H:%M') %> →
- <%= $station->[2]{rt_dep}->strftime('%H:%M') %>
- % if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) {
- %= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60);
+ <%= $station->[2]{arr}->strftime('%H:%M') %> →
+ <%= $station->[2]{dep}->strftime('%H:%M') %>
+ % if ($station->[2]{dep_delay}) {
+ %= sprintf('(%+d)', $station->[2]{dep_delay} / 60);
% }
% last;
% }
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index 0f7cacd..f031e15 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -88,19 +88,19 @@
% if ($journey->{arr_name} and $station->[0] eq $journey->{arr_name}) {
% last;
% }
- % if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) {
- <%= $station->[0] %><br/><%= $station->[2]{rt_arr}->strftime('%H:%M') %>
- % if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) {
- %= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60);
+ % if (($station->[2]{arr_countdown} // 0) > 0 and $station->[2]{arr}) {
+ <%= $station->[0] %><br/><%= $station->[2]{arr}->strftime('%H:%M') %>
+ % if ($station->[2]{arr_delay}) {
+ %= sprintf('(%+d)', $station->[2]{arr_delay} / 60);
% }
% last;
% }
- % if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) {
+ % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{arr} and $station->[2]{dep}) {
<%= $station->[0] %><br/>
- <%= $station->[2]{rt_arr}->strftime('%H:%M') %> →
- <%= $station->[2]{rt_dep}->strftime('%H:%M') %>
- % if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) {
- %= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60);
+ <%= $station->[2]{arr}->strftime('%H:%M') %> →
+ <%= $station->[2]{dep}->strftime('%H:%M') %>
+ % if ($station->[2]{dep_delay}) {
+ %= sprintf('(%+d)', $station->[2]{dep_delay} / 60);
% }
% last;
% }
@@ -113,21 +113,21 @@
% if ($journey->{arr_name} and $station->[0] eq $journey->{arr_name}) {
% last;
% }
- % if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) {
+ % if (($station->[2]{arr_countdown} // 0) > 0 and $station->[2]{arr}) {
Nächster Halt:<br/>
- <%= $station->[0] %><br/><%= $station->[2]{rt_arr}->strftime('%H:%M') %>
- % if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) {
- %= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60);
+ <%= $station->[0] %><br/><%= $station->[2]{arr}->strftime('%H:%M') %>
+ % if ($station->[2]{arr_delay}) {
+ %= sprintf('(%+d)', $station->[2]{arr_delay} / 60);
% }
% last;
% }
- % if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) {
+ % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{arr} and $station->[2]{dep}) {
Aktueller Halt:<br/>
<%= $station->[0] %><br/>
- <%= $station->[2]{rt_arr}->strftime('%H:%M') %> →
- <%= $station->[2]{rt_dep}->strftime('%H:%M') %>
- % if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) {
- %= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60);
+ <%= $station->[2]{arr}->strftime('%H:%M') %> →
+ <%= $station->[2]{dep}->strftime('%H:%M') %>
+ % if ($station->[2]{dep_delay}) {
+ %= sprintf('(%+d)', $station->[2]{dep_delay} / 60);
% }
% last;
% }