From 87a40ca57f724194d5f2f4a35731f08c3eb821d0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 21 Dec 2019 23:53:49 +0100 Subject: more compact and less ugly wagon order display --- templates/wagenreihung.html.ep | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'templates/wagenreihung.html.ep') diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep index b14c2dc..25a2153 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -37,17 +37,6 @@ % if ($wagon->is_locomotive or $wagon->is_powercar) { % $bg = 'background-color: #cccccc;'; % } -
-% if ($wr->has_bad_wagons) { -% } -% elsif ($wr->direction == 100) { - ↓ -% } -% else { - ↑ -% } -
% if ($wagon->is_locomotive or $wagon->is_powercar) { @@ -76,30 +65,31 @@ star % } % } -
-
-% if ($wagon->is_first_class) { - 1 +
+% if ($wr->has_bad_wagons) { % } -% elsif ($wagon->is_second_class) { - 2 +% elsif ($wr->direction == 100) { + arrow_downward % } % else { - + arrow_upward % } +
+
+
%= $wagon->type % my $uic_id = $wagon->uic_id; % if (length($uic_id) != 12) { - <%= $uic_id %> + <%= $uic_id %> % } % 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) %> + <%= 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) %> + <%= 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) %> % }
% } -- cgit v1.2.3