summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-01 13:00:25 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-01 13:00:25 +0200
commit12144506b1259dbc17be6f58c6946f87c6b7616e (patch)
treea407bca3051cc2cda3ede3ed8dae6a142a2932dd
parent8f86e23595b5c0d16214056be3be37b3b67a1394 (diff)
wr preview: use same left/right indicators as platform4.26.5
-rw-r--r--templates/_train_details.html.ep16
1 files 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 @@
</div> <!-- dataline -->
% if (my $wr = $departure->{wr}) {
<div class="wagonorder-preview">
-% 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 = '▶';
% }
<a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{wr_direction} // '' %>">
- %= $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]) {
<span class="<%= $entry->[1] %>"><%= $entry->[0] %></span>
@@ -132,7 +138,7 @@
%= $entry->[0]
% }
% }
- %= $direction
+ %= $right
</a>
</div>
% }