summaryrefslogtreecommitdiff
path: root/templates/_wagon.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-01-02 18:03:34 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-01-02 18:03:34 +0100
commit836cd8a39a2c6c64e3cd23239a18fe1c6ea8515c (patch)
tree32bd695624cdb2e7c987548fb72e47190c1a063c /templates/_wagon.html.ep
parent9958706954315a7db9a69662cd0c1b093f940385 (diff)
show exit direction in wagon order3.9.3
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>