summaryrefslogtreecommitdiff
path: root/templates/_wagon.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/_wagon.html.ep')
-rw-r--r--templates/_wagon.html.ep26
1 files changed, 19 insertions, 7 deletions
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 @@
</div>
<div class="details" style="
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;">
-% if (my $img = wagon_image($type, $wagon->type, $wagon->uic_id)) {
- <a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&amp;s=<%= $wagon->section %>&amp;r=<%= $wref %>"><%= $wagon->type %></a>
-% }
-% else {
- <span class="type">
-%= $wagon->type
- </span>
+% if ($exit_dir ne 'right') {
+% if (my $img = wagon_image($type, $wagon->type, $wagon->uic_id)) {
+ <a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&amp;s=<%= $wagon->section %>&amp;r=<%= $wref %>"><%= $wagon->type %></a>
+% }
+% else {
+ <span class="type">
+%= $wagon->type
+ </span>
+% }
% }
% my $uic_id = $wagon->uic_id;
% if (length($uic_id) != 12) {
@@ -68,4 +70,14 @@
% else {
<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)) {
+ <a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&amp;s=<%= $wagon->section %>&amp;r=<%= $wref %>"><%= $wagon->type %></a>
+% }
+% else {
+ <span class="type">
+%= $wagon->type
+ </span>
+% }
+% }
</div>