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/layouts/app.html.ep | 2 +- templates/layouts/legacy.html.ep | 2 +- templates/wagenreihung.html.ep | 34 ++++++++++++---------------------- 3 files changed, 14 insertions(+), 24 deletions(-) (limited to 'templates') diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index 5a36685..2b2bf79 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -18,7 +18,7 @@ % } - % my $av = 'v20'; # asset version + % my $av = 'v21'; # asset version %= stylesheet "/static/${av}/css/app.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep index 8b96c8f..e74d2e5 100644 --- a/templates/layouts/legacy.html.ep +++ b/templates/layouts/legacy.html.ep @@ -17,7 +17,7 @@ % } - % my $av = 'v20'; # asset version + % my $av = 'v21'; # asset version %= stylesheet "/static/${av}/css/default.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" 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