From 35bf3022330602242d0d8dbf7a7b2a7b2bd66e71 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 1 May 2024 12:29:59 +0200 Subject: Indicate carriages belonging to other trains in carriage formation preview --- templates/_train_details.html.ep | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 0f02483..425446a 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -124,11 +124,13 @@ % } %= $direction - % if (defined $departure->{direction_num} and $departure->{direction_num} != $wr->direction) { - %= join(q{ }, reverse @{$departure->{wr_preview} // []}) - % } - % else { - %= join(q{ }, @{$departure->{wr_preview} // []}) + % 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] %> + % } + % else { + %= $entry->[0] + % } % } %= $direction -- cgit v1.2.3