From 836cd8a39a2c6c64e3cd23239a18fe1c6ea8515c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 2 Jan 2021 18:03:34 +0100 Subject: show exit direction in wagon order --- templates/_wagon.html.ep | 26 +++++++++++++++++++------- templates/layouts/app.html.ep | 2 +- templates/layouts/legacy.html.ep | 2 +- templates/wagenreihung.html.ep | 4 ++-- templates/zugbildung_db.html.ep | 4 ++-- 5 files changed, 25 insertions(+), 13 deletions(-) (limited to 'templates') diff --git a/templates/_wagon.html.ep b/templates/_wagon.html.ep index a9221bd..7a2a9a3 100644 --- a/templates/_wagon.html.ep +++ b/templates/_wagon.html.ep @@ -50,13 +50,15 @@
-% if (my $img = wagon_image($type, $wagon->type, $wagon->uic_id)) { - <%= $wagon->type %> -% } -% else { - -%= $wagon->type - +% if ($exit_dir ne 'right') { +% if (my $img = wagon_image($type, $wagon->type, $wagon->uic_id)) { + <%= $wagon->type %> +% } +% else { + +%= $wagon->type + +% } % } % my $uic_id = $wagon->uic_id; % if (length($uic_id) != 12) { @@ -67,5 +69,15 @@ % } % 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($type, $wagon->type, $wagon->uic_id)) { + <%= $wagon->type %> +% } +% else { + +%= $wagon->type + +% } % }
diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index ebaf1cb..83d425c 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -18,7 +18,7 @@ % } - % my $av = 'v44'; # asset version + % my $av = 'v45'; # asset version % if (session('theme') and session('theme') eq 'dark' or param('dark')) { %= stylesheet "/static/${av}/css/dark.min.css", id => 'theme' % } diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep index b45ae6c..6d9c189 100644 --- a/templates/layouts/legacy.html.ep +++ b/templates/layouts/legacy.html.ep @@ -17,7 +17,7 @@ % } - % my $av = 'v44'; # asset version + % my $av = 'v45'; # 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 087c2bf..4d83d2b 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -50,7 +50,7 @@ % }
-
+
% if (not $wr->has_bad_wagons) { % for my $section ($wr->sections) {
-
+
% for my $wagon (@{$wagons // []}) { -%= include '_wagon', direction => undef, wagon => $wagon, type => $zb->{type}, wref => ''; +%= include '_wagon', direction => undef, wagon => $wagon, type => $zb->{type}, wref => '', exit_dir => 'unknown'; % }