diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-05-30 19:46:23 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-05-30 19:47:38 +0200 |
commit | ebf9365f88581bb5f6b618ad8af9ae2f19695119 (patch) | |
tree | b29aca4e811b90c0fe5ebb52efdb4db4e81d0c17 /templates | |
parent | 0fba151cc267ef117e8dbca9f0912b5ee08fdc45 (diff) |
add realtime data to train route
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_train_details.html.ep | 14 |
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 --> |