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.ep28
1 files changed, 24 insertions, 4 deletions
diff --git a/templates/_wagon.html.ep b/templates/_wagon.html.ep
index 94ef56a..59a2ca1 100644
--- a/templates/_wagon.html.ep
+++ b/templates/_wagon.html.ep
@@ -6,6 +6,9 @@
% if ($wagon->is_locomotive or $wagon->is_powercar) {
% $extra_class .= ' powercar';
% }
+% if ($wagon->is_closed) {
+% $extra_class .= ' closed';
+% }
% if ($wagon->train_no ne $train_no) {
% $extra_class .= ' nondestwagon';
% }
@@ -13,6 +16,9 @@
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%; <%= $bg %>">
% if ($wagon->is_locomotive or $wagon->is_powercar) {
% }
+% elsif ($wagon->is_closed) {
+ X
+% }
% else {
%= $wagon->number // '?'
% if ($wagon->has_accessibility) {
@@ -38,9 +44,9 @@
% }
% }
<div class="direction">
-% if (not defined $direction) {
+% if (not defined $wr->direction) {
% }
-% elsif ($direction == 100) {
+% elsif ($wr->direction == 100) {
<i class="material-icons">arrow_downward</i>
% }
% else {
@@ -51,7 +57,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($wagon->train_subtype // $type // '?', $wagon->type, $wagon->uic_id)) {
+% if (my $img = wagon_image($wagon->train_subtype // $wr->train_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 {
@@ -71,7 +77,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($wagon->train_subtype // $type // '?', $wagon->type, $wagon->uic_id)) {
+% if (my $img = wagon_image($wagon->train_subtype // $wr->train_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 {
@@ -80,4 +86,18 @@
</span>
% }
% }
+% if ($multi and $first) {
+ <br/>
+ <span class="groupno">
+% if (scalar $wr->train_nos > 1) {
+ <%= $wr->train_type %> <%= ($wr->groups)[$wagon->group_index]->train_no %>
+% }
+% if (scalar $wr->destinations > 1) {
+ → <%= $wr->{data}{istformation}{allFahrzeuggruppe}[$wagon->group_index]{zielbetriebsstellename} %>
+% }
+ </span>
+ % if ($multi and ($wr->groups)[$wagon->group_index]->desc_short) {
+ <span class="grouptype"><%= ($wr->groups)[$wagon->group_index]->desc_short %></span>
+% }
+% }
</div>