From ebf9365f88581bb5f6b618ad8af9ae2f19695119 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 30 May 2019 19:46:23 +0200 Subject: add realtime data to train route --- templates/_train_details.html.ep | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'templates') 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} %> +% if ($stop->{rt_dep}) { + "><%= $stop->{sched_dep}->strftime('%H:%M') %> (heute <%= $stop->{rt_dep}->strftime('%H:%M') %>) <%= $stop->{name} %> +% } +% else { + "><%= $stop->{sched_dep} ? $stop->{sched_dep}->strftime('%H:%M') : q{} %> <%= $stop->{name} %> +% } % } @@ -150,7 +155,12 @@ % else { generic-stop % } - "><%= $stop->{arr} // q{} %> <%= $stop->{name} %> +% if ($stop->{rt_arr}) { + "><%= $stop->{sched_arr}->strftime('%H:%M') %> (heute <%= $stop->{rt_arr}->strftime('%H:%M') %>) <%= $stop->{name} %> +% } +% else { + "><%= $stop->{sched_arr} ? $stop->{sched_arr}->strftime('%H:%M') : q{} %> <%= $stop->{name} %> +% } % } -- cgit v1.2.3