travelynx/templates/_wagons.html.ep
2020-01-06 17:59:40 +01:00

22 lines
989 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% for my $wagongroup (@{$wagongroups // []}) {
<%= $wagongroup->{name} %>
% my ($wagon_number) = ($wagongroup->{name} =~ m{ ^ ICE 0* (\d+) $ }x);
% if ($wagon_number and my $group_name = app->ice_name->{$wagon_number}) {
„<%= $group_name %>“
% }
als <b><%= $journey->{type} %> <%= $wagongroup->{no} %></b>
von <b><%= $wagongroup->{from} %></b> nach <b><%= $wagongroup->{to} %></b><br/>
% for my $wagon (@{$wagongroup->{wagons}}) {
% if (length($wagon->{id}) == 12) {
<span><%= substr($wagon->{id}, 0, 2) %></span><span><%= substr($wagon->{id}, 2, 2) %></span><span><%= substr($wagon->{id}, 4, 1) %></span><span class="wagonclass"><%= substr($wagon->{id}, 5, 3) %></span><span class="wagonnum"><%= substr($wagon->{id}, 8, 3) %></span><span class="checksum"><%= substr($wagon->{id}, 11) %></span>
% }
% elsif ($wagon->{id}) {
„<%= $wagon->{id} %>“
% }
%= $wagon->{type}
% if ($wagon->{number}) {
Wagen <%= $wagon->{number} %>
% }
<br/>
% }
% }