% if (@{$departures}) {
% my $i = 0;
% for my $departure (@{$departures}) {
% $i++;
% my $route_str = q{};
% my $via_max = @{$departure->{via}};
% my $via_cur = 0;
% for my $stop (@{$departure->{via}}) {
% $via_cur++;
% $route_str .= $stop . ($via_cur < $via_max ? ' - ' : q{});
% }
-
% my $linetype = q{};
% if ( $departure->{train} =~ m{ ^ S \s? \d{1,2} $ }x ) {
% $linetype = 'sbahn';
% }
%= $departure->{train}
% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) {
% if ($route_str) {
- Via: <%= $route_str %>
% }
% for my $pair (@{$departure->{moreinfo}}) {
-
% if ($pair->[0]->isa('DateTime')) {
%= $pair->[0]->strftime('%H:%M')
% }
% else {
%= $pair->[0]
% }
:
%= $pair->[1]
% }
% }
% if ($departure->{info} and length $departure->{info}) {
%= $departure->{info}
% }
% else {
%= $route_str
% }
% my $extraclasses = q{};
% if ($departure->{is_cancelled}) {
% $extraclasses .= ' cancelled';
% }
% if ($departure->{delay} and not $departure->{is_cancelled}) {
% if ($show_realtime) {
(<%= sprintf('+%d', $departure->{delay}) %>)
% }
% else {
(+<%= $departure->{delay} %>)
% }
% }
%= $departure->{platform}
% if ($show_realtime and $departure->{delay} and not $departure->{is_cancelled}) {
% }
%= $departure->{time}
% if ($show_realtime and $departure->{delay} and not $departure->{is_cancelled}) {
% }
% }
% }
% else {
DB-Fakedisplay displays the next departures at a DB station, just like the big
LC display in the station itself.
% }