summaryrefslogtreecommitdiff
path: root/templates/_train_details.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-09-20 10:43:16 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-09-20 10:43:16 +0200
commit93256284a230bda3c8f04e4a9d3ae689a5fe7ff1 (patch)
treee7cc9cb3ecd765ffdc58d63d505f62bc2bb12a51 /templates/_train_details.html.ep
parentc8f5ba2493b6d9bcceab871d41b7ec5692d41058 (diff)
show direction of travel if available
Diffstat (limited to 'templates/_train_details.html.ep')
-rw-r--r--templates/_train_details.html.ep12
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>