summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-09-20 10:59:58 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-09-20 10:59:58 +0200
commit32d2097986093cb8c5cf7a769328d97b3e61145f (patch)
tree53f36d28c88ac5708d8285939bbc3a649a565c0a
parent878df847bac8cffb5452af30c3270fbdd6050651 (diff)
fix route real-time display for requested stop
-rw-r--r--templates/_train_details.html.ep14
1 files changed, 13 insertions, 1 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index a7ad86e..9e7a7f2 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -173,7 +173,19 @@
% }
</li>
% }
- <li class="<%= $departure->{is_cancelled} ? 'cancelled-stop' : q{} %>"><%= $departure->{departure} // $departure->{arrival} // q{} %> <strong><%= $station_name %></strong></li>
+ <li class="<%= $departure->{is_cancelled} ? 'cancelled-stop' : q{} %>"><%= $departure->{sched_departure} // $departure->{sched_arrival} // q{} %>
+% if ($departure->{sched_departure}) {
+% if ($departure->{departure} ne $departure->{sched_departure}) {
+ (heute <%= $departure->{departure} %>)
+% }
+% }
+% elsif ($departure->{arrival}) {
+% if ($departure->{arrival} ne $departure->{sched_arrival}) {
+ (heute <%= $departure->{arrival} %>)
+% }
+% }
+ <strong><%= $station_name %></strong>
+ </li>
% for my $stop (@{$departure->{route_post_diff}}) {
<li>
<a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class="