% my $bg = ''; % my $extra_class = ''; % if ($wagon->has_first_class) { % $extra_class .= ' firstclass'; % } % if ($wagon->is_locomotive or $wagon->is_powercar) { % $extra_class .= ' powercar'; % } % if ($wagon->is_closed) { % $extra_class .= ' closed'; % } % if ($group->train_no ne $train_no) { % $extra_class .= ' nondestwagon'; % }
% if ($wagon->is_locomotive or $wagon->is_powercar) { % } % elsif ($wagon->is_closed) { X % } % else { %= $wagon->number // q{} % if ($wagon->has_wheelchair_space) { accessible % } % if ($wagon->has_bistro) { restaurant % } % if ($wagon->has_quiet_zone) { volume_off % } % if ($wagon->has_family_zone) { people % } % if ($wagon->has_bahn_comfort) { star % } % }
% if (not defined $wr->direction) { % } % elsif ($wr->direction == 100) { arrow_downward % } % else { arrow_upward % }
% if ($exit_dir ne 'right') { % if (my $img = wagon_image($wr->train_type // '?', $wagon->type, $wagon->uic_id)) { <%= $wagon->type %> % } % else { %= $wagon->type % } % } % my $uic_id = $wagon->uic_id; % if (length($uic_id) != 12 and length($uic_id) != 14) { <%= $uic_id %> % } % elsif (substr($uic_id, 0, 2) >= 90) { <%= substr($uic_id, 0, 2) %><%= substr($uic_id, 2, 2) %><%= substr($uic_id, 4, 1) %><%= substr($uic_id, 5, 3) %><%= substr($uic_id, 8, 3) %><%= substr($uic_id, 11) %> % } % else { <%= substr($uic_id, 0, 2) %><%= substr($uic_id, 2, 2) %><%= substr($uic_id, 4, 2) %><%= substr($uic_id, 6, 2) %><%= substr($uic_id, 8, 3) %><%= substr($uic_id, 11) %> % } % if ($exit_dir eq 'right') { % if (my $img = wagon_image($wr->train_type // '?', $wagon->type, $wagon->uic_id)) { <%= $wagon->type %> % } % else { %= $wagon->type % } % } % if ($multi and $first) {
% if (scalar $wr->train_numbers > 1) { <%= $group->train_type %> <%= $group->train_no %> % } % if (scalar $wr->destinations > 1) { → <%= $group->destination %> % } % if ($multi and $group->desc_short) { <%= $group->desc_short %> % } % }