diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-12-25 17:27:57 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-12-25 17:27:57 +0100 |
commit | 0f9dde3810a3b86e0769e6013a19ccf0faeba0a3 (patch) | |
tree | cd2c4a5f2b9914f1e6d335f00038c12ebe66d209 /templates/_wagon.html.ep | |
parent | 7d29c0f25f4d7e4e47ea726bcdac1985da866126 (diff) |
add wagon images for IC and ICE 1/2/4
IC2, ICE 3 and ICE T will follow soon.
Diffstat (limited to 'templates/_wagon.html.ep')
-rw-r--r-- | templates/_wagon.html.ep | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/templates/_wagon.html.ep b/templates/_wagon.html.ep index 95b1c2e..a9221bd 100644 --- a/templates/_wagon.html.ep +++ b/templates/_wagon.html.ep @@ -50,9 +50,14 @@ </div> <div class="details" style=" top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;"> - <span class="type"> -%= $wagon->type - </span> +% if (my $img = wagon_image($type, $wagon->type, $wagon->uic_id)) { + <a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&s=<%= $wagon->section %>&r=<%= $wref %>"><%= $wagon->type %></a> +% } +% else { + <span class="type"> +%= $wagon->type + </span> +% } % my $uic_id = $wagon->uic_id; % if (length($uic_id) != 12) { <span class="uicunknown"><%= $uic_id %></span> |