From f3694fdc35b817138a97a42e39eb6a2619591736 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 10 Jan 2021 12:22:47 +0100 Subject: fix wagon images for trains consisting of different sub-types E.g. ICE T 411 + ICE T 415 or ICE 3 403.1 + ICE 3 403 Redesign --- templates/_wagon.html.ep | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/_wagon.html.ep') diff --git a/templates/_wagon.html.ep b/templates/_wagon.html.ep index 7a2a9a3..6c02827 100644 --- a/templates/_wagon.html.ep +++ b/templates/_wagon.html.ep @@ -51,7 +51,7 @@
% if ($exit_dir ne 'right') { -% if (my $img = wagon_image($type, $wagon->type, $wagon->uic_id)) { +% if (my $img = wagon_image($wagon->train_subtype // 'IC', $wagon->type, $wagon->uic_id)) { <%= $wagon->type %> % } % else { @@ -71,7 +71,7 @@ <%= 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)) { +% if (my $img = wagon_image($wagon->train_subtype // 'IC', $wagon->type, $wagon->uic_id)) { <%= $wagon->type %> % } % else { -- cgit v1.2.3