summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep12
1 files changed, 7 insertions, 5 deletions
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 @@
% }
<a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{wr_direction} // '' %>">
%= $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]) {
+ <span class="<%= $entry->[1] %>"><%= $entry->[0] %></span>
+ % }
+ % else {
+ %= $entry->[0]
+ % }
% }
%= $direction
</a>