diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-09-20 10:43:16 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-09-20 10:43:16 +0200 |
commit | 93256284a230bda3c8f04e4a9d3ae689a5fe7ff1 (patch) | |
tree | e7cc9cb3ecd765ffdc58d63d505f62bc2bb12a51 /templates | |
parent | c8f5ba2493b6d9bcceab871d41b7ec5692d41058 (diff) |
show direction of travel if available
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_train_details.html.ep | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 2816af0..a7ad86e 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -66,12 +66,20 @@ <span class="minfo">Fahrt fällt aus</span> % } % else { +% my $left = ''; +% my $right = ''; +% if ($departure->{direction} and $departure->{direction} eq 'l') { +% $left = '◀ '; +% } +% elsif ($departure->{direction} and $departure->{direction} eq 'r') { +% $right = ' ▶'; +% } % if ($departure->{scheduled_platform} and $departure->{platform} % and $departure->{scheduled_platform} ne $departure->{platform}) { - <span class="minfo">Gleis <%= $departure->{platform} %></span> + <span class="minfo"><%= $left %>Gleis <%= $departure->{platform} %><%= $right %></span> % } % elsif ($departure->{scheduled_platform} or $departure->{platform}) { - Gleis <%= $departure->{platform} // $departure->{scheduled_platform} %> + <%= $left %>Gleis <%= $departure->{platform} // $departure->{scheduled_platform} %><%= $right %> % } % } </div> |