diff options
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 6 | ||||
-rw-r--r-- | templates/_train_details.html.ep | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 2aac171..4d8406e 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -856,11 +856,11 @@ sub render_train { } if ($direction) { - $departure->{direction} = $direction; - $departure->{direction_num} = $direction eq 'l' ? 0 : 100; + $departure->{wr_direction} = $direction; + $departure->{wr_direction_num} = $direction eq 'l' ? 0 : 100; } elsif ( $platform_info->{direction} ) { - $departure->{direction} = 'a' . $platform_info->{direction}; + $departure->{wr_direction} = 'a' . $platform_info->{direction}; } return; diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 1b7bfce..0f02483 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -68,10 +68,10 @@ % else { % my $left = ''; % my $right = ''; -% if ($departure->{direction} and $departure->{direction} eq 'l') { +% if ($departure->{wr_direction} and $departure->{wr_direction} eq 'l') { % $left = '◀ '; % } -% elsif ($departure->{direction} and $departure->{direction} eq 'r') { +% elsif ($departure->{wr_direction} and $departure->{wr_direction} eq 'r') { % $right = ' ▶'; % } % if ($departure->{scheduled_platform} and $departure->{platform} @@ -119,10 +119,10 @@ % if (my $wr = $departure->{wr}) { <div class="wagonorder-preview"> % my $direction = defined $wr->direction ? $wr->direction == 100 ? '→' : '←' : q{}; -% if ($departure->{direction}) { -% $direction = $departure->{direction} eq 'l' ? '◀' : '▶'; +% if ($departure->{wr_direction}) { +% $direction = $departure->{wr_direction} eq 'l' ? '◀' : '▶'; % } - <a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{direction} // '' %>"> + <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} // []}) @@ -144,7 +144,7 @@ % } % } % if ($departure->{wr_link}) { - <a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{direction} // '' %>"><i class="material-icons" aria-hidden="true">train</i> <%= $departure->{wr_text} || 'Wagen' %> + <a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{wr_direction} // '' %>"><i class="material-icons" aria-hidden="true">train</i> <%= $departure->{wr_text} || 'Wagen' %> </a> % } % if ($departure->{train_type} and $departure->{train_no}) { |