% if (@{$departures}) {
% my $i = 0;
% for my $departure (@{$departures}) {
% $i++;
-
% my $linetype = q{};
% if ( $departure->{train} =~ m{ ^ S \s? \d{1,2} $ }x ) {
% $linetype = 'sbahn';
% }
%= $departure->{train}
% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) {
% 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 {
% my $via_max = @{$departure->{via}};
% my $via_cur = 0;
% for my $stop (@{$departure->{via}}) {
% $via_cur++;
<%= $stop %><% if ($via_cur < $via_max) { %> - <% } %>
% }
% }
% my $extraclasses = q{};
% if ($departure->{is_cancelled}) {
% $extraclasses .= ' cancelled';
% }
% if ($departure->{delay} and not $departure->{is_cancelled}) {
% if ($show_realtime) {
(+<%= $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.
% }