summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-05-30 19:46:23 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-05-30 19:47:38 +0200
commitebf9365f88581bb5f6b618ad8af9ae2f19695119 (patch)
treeb29aca4e811b90c0fe5ebb52efdb4db4e81d0c17 /templates
parent0fba151cc267ef117e8dbca9f0912b5ee08fdc45 (diff)
add realtime data to train route
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep14
1 files changed, 12 insertions, 2 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index cdadaa0..f4b9247 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -127,7 +127,12 @@
% else {
generic-stop
% }
- "><%= $stop->{dep} // q{} %> <%= $stop->{name} %></a>
+% if ($stop->{rt_dep}) {
+ "><%= $stop->{sched_dep}->strftime('%H:%M') %> (heute <%= $stop->{rt_dep}->strftime('%H:%M') %>) <%= $stop->{name} %></a>
+% }
+% else {
+ "><%= $stop->{sched_dep} ? $stop->{sched_dep}->strftime('%H:%M') : q{} %> <%= $stop->{name} %></a>
+% }
</li>
% }
</ul> <!-- mroute -->
@@ -150,7 +155,12 @@
% else {
generic-stop
% }
- "><%= $stop->{arr} // q{} %> <%= $stop->{name} %></a>
+% if ($stop->{rt_arr}) {
+ "><%= $stop->{sched_arr}->strftime('%H:%M') %> (heute <%= $stop->{rt_arr}->strftime('%H:%M') %>) <%= $stop->{name} %></a>
+% }
+% else {
+ "><%= $stop->{sched_arr} ? $stop->{sched_arr}->strftime('%H:%M') : q{} %> <%= $stop->{name} %></a>
+% }
</li>
% }
</ul> <!-- mroute -->