% if ($departure->{train_type} and $departure->{train_no}) {
%= $departure->{train_type}
% }
% if ($departure->{train_line} ) {
%= $departure->{train_line}
% }
% elsif ($departure->{train_no}) {
<%= $departure->{train_no} %>
% }
% else {
%= $departure->{train}
% }
% if (@{$departure->{replaced_by}} or @{$departure->{replacement_for}}) {
% if ($departure->{platform}) {
Gleis <%= $departure->{platform} %>
% }
% if ($departure->{scheduled_platform} and $departure->{platform}
% and $departure->{scheduled_platform} ne $departure->{platform}) {
(nicht Gleis <%= $departure->{scheduled_platform} %>)
% }
% elsif ($departure->{changed_platform}) {
(Gleiswechsel)
% }
% if (not $departure->{is_cancelled}) {
% if ($departure->{sched_arrival}) {
Ankunft: <%= $departure->{sched_arrival} %>
% if ($departure->{arrival} and $departure->{arrival} ne $departure->{sched_arrival}) {
(heute <%= $departure->{arrival} %>)
% }
% }
% if ($departure->{sched_departure}) {
Abfahrt: <%= $departure->{sched_departure} %>
% if ($departure->{departure} and $departure->{departure} ne $departure->{sched_departure}) {
(heute <%= $departure->{departure} %>)
% }
% }
% if (not ($departure->{sched_arrival} or $departure->{sched_departure})) {
Abfahrt: <%= $departure->{time} %>
% if ($departure->{delay}) {
(heute +<%= $departure->{delay} %>)
% }
% }
% }
% if ($departure->{route_post_diff} and @{$departure->{route_post_diff}}) {
Über:
% my $first = 0;
% for my $stop (@{$departure->{route_post_diff} // q{???}}) {
% if ($first++) {
–
% }
% if ($stop->{isAdditional}) {
<%= $stop->{name} %>
% }
% elsif ($stop->{isCancelled}) {
<%= $stop->{name} %>
% }
% elsif ($self->is_important($stop->{name})) {
<%= $stop->{name} %>
% }
% else {
<%= $stop->{name} %>
% }
% }
% }
% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) {
Meldungen:
% for my $pair (@{$departure->{moreinfo}}) {
-
% if ($pair->[0]->isa('DateTime')) {
% if ($pair->[0]->day != $dt_now->day) {
% $pair->[0]->set_locale('de_DE');
%= $pair->[0]->strftime('%a %H:%M')
% }
% else {
%= $pair->[0]->strftime('%H:%M')
% }
% }
% else {
%= $pair->[0]
% }
:
%= $pair->[1]
% }
% if ($departure->{route_info}) {
- <%= $departure->{route_info} %>
% }
% }
% if ($departure->{info} and length $departure->{info}) {