From d849c86099c6db3929f7eba6711b4f8da829d04a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 21 Dec 2019 19:17:01 +0100 Subject: wagon order: show UIC wagon ID --- templates/wagenreihung.html.ep | 66 ++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 28 deletions(-) (limited to 'templates/wagenreihung.html.ep') diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep index fd20196..0cd2736 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -37,7 +37,7 @@ % if ($wagon->is_locomotive or $wagon->is_powercar) { % $bg = 'background-color: #cccccc;'; % } -
{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;"> % if ($wr->has_bad_wagons) { % } @@ -50,50 +50,60 @@
+ min-width: 6em; + border: 1px solid #999999; padding-left: 0.2em; padding-right: 0.2em; <%= $bg %>"> % if ($wagon->is_locomotive or $wagon->is_powercar) { LOK % } % else { %= $wagon->number // '?' +% if ($wagon->has_accessibility) { + accessible +% } +% if ($wagon->has_bistro) { + restaurant +% } +% if ($wagon->has_compartments) { + +% } +% if ($wagon->has_quiet_area) { + volume_off +% } +% if ($wagon->has_phone_area) { + smartphone +% } +% if ($wagon->has_family_area) { + people +% } +% if ($wagon->has_bahn_comfort) { + star +% } % }
-
{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;"> % if ($wagon->is_first_class) { 1 % } -% if ($wagon->is_second_class) { +% elsif ($wagon->is_second_class) { 2 % } -% if ($wagon->has_accessibility) { - accessible -% } -% if ($wagon->has_bistro) { - restaurant -% } -% if ($wagon->has_compartments) { - -% } -% if ($wagon->has_quiet_area) { - volume_off -% } -% if ($wagon->has_phone_area) { - smartphone +% else { + % } -% if ($wagon->has_family_area) { - people + +%= $wagon->type + +% my $uic_id = $wagon->uic_id; +% if (length($uic_id) != 12) { + <%= $uic_id %> % } -% if ($wagon->has_bahn_comfort) { - star +% elsif ($wr->train_type eq 'ICE') { + <%= 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) %> % } -% if ($wagon->is_interregio) { - +% 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) %> % } - -%= $wagon->type -
% } -- cgit v1.2.3