diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-01-10 12:22:47 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-01-10 12:22:47 +0100 |
commit | f3694fdc35b817138a97a42e39eb6a2619591736 (patch) | |
tree | 333a56dc3a9b28464e4f98307329a1faa894bfb8 /templates/_wagon.html.ep | |
parent | 789d604c1a83a1063b4c0f86f1853b3753c7327d (diff) |
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
Diffstat (limited to 'templates/_wagon.html.ep')
-rw-r--r-- | templates/_wagon.html.ep | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ <div class="details" style=" top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;"> % 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)) { <a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&s=<%= $wagon->section %>&r=<%= $wref %>"><%= $wagon->type %></a> % } % else { @@ -71,7 +71,7 @@ <span class="uicexchange"><%= substr($uic_id, 0, 2) %></span><span class="uiccountry"><%= substr($uic_id, 2, 2) %></span><span class="uic56"><%= substr($uic_id, 4, 2) %></span><span class="uic78"><%= substr($uic_id, 6, 2) %></span><span class="uicno"><%= substr($uic_id, 8, 3) %></span><span class="uiccheck"><%= substr($uic_id, 11) %></span> % } % 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)) { <a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&s=<%= $wagon->section %>&r=<%= $wref %>"><%= $wagon->type %></a> % } % else { |