From 12144506b1259dbc17be6f58c6946f87c6b7616e Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 1 May 2024 13:00:25 +0200 Subject: wr preview: use same left/right indicators as platform --- templates/_train_details.html.ep | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 425446a..f560950 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -118,12 +118,18 @@ % if (my $wr = $departure->{wr}) {
-% my $direction = defined $wr->direction ? $wr->direction == 100 ? '→' : '←' : q{}; -% if ($departure->{wr_direction}) { -% $direction = $departure->{wr_direction} eq 'l' ? '◀' : '▶'; +% my $left = defined $wr->direction ? $wr->direction == 100 ? q{} : '←' : q{}; +% my $right = defined $wr->direction ? $wr->direction == 100 ? '→' : q{} : q{}; +% if ($departure->{wr_direction} and $departure->{wr_direction} eq 'l') { +% $left = '◀'; +% $right = q{}; +% } +% elsif ($departure->{wr_direction} and $departure->{wr_direction} eq 'r') { +% $left = q{}; +% $right = '▶'; % } - %= $direction + %= $left % for my $entry ((defined $departure->{wr_direction_num} and $departure->{wr_direction_num} != $wr->direction) ? reverse @{$departure->{wr_preview} // []} : @{$departure->{wr_preview} // []}) { % if ($entry->[1]) { <%= $entry->[0] %> @@ -132,7 +138,7 @@ %= $entry->[0] % } % } - %= $direction + %= $right
% } -- cgit v1.2.3