diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-12-21 19:17:01 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-12-21 19:17:01 +0100 |
commit | d849c86099c6db3929f7eba6711b4f8da829d04a (patch) | |
tree | caca7736c9efede41ef6b600087c532388b3d1d0 | |
parent | 69568899ff68292fb4855bf5906fb3f56c72d9a7 (diff) |
wagon order: show UIC wagon ID
-rw-r--r-- | templates/wagenreihung.html.ep | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep index fd20196..0cd2736 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -37,7 +37,7 @@ % if ($wagon->is_locomotive or $wagon->is_powercar) { % $bg = 'background-color: #cccccc;'; % } - <div style="position: absolute; left: 6em; + <div style="position: absolute; left: 10em; top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;"> % if ($wr->has_bad_wagons) { % } @@ -50,50 +50,60 @@ </div> <div style="position: absolute; left: 3em; top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%; - min-width: 2em; text-align: right; - border: 1px solid black; padding-left: 0.2em; padding-right: 0.2em; <%= $bg %>"> + min-width: 6em; + border: 1px solid #999999; padding-left: 0.2em; padding-right: 0.2em; <%= $bg %>"> % if ($wagon->is_locomotive or $wagon->is_powercar) { LOK % } % else { %= $wagon->number // '?' +% if ($wagon->has_accessibility) { + <i class="material-icons" style="font-size: 20px;">accessible</i> +% } +% if ($wagon->has_bistro) { + <i class="material-icons">restaurant</i> +% } +% if ($wagon->has_compartments) { + <!--<i class="material-icons">folder</i>--> +% } +% if ($wagon->has_quiet_area) { + <i class="tiny material-icons">volume_off</i> +% } +% if ($wagon->has_phone_area) { + <i class="material-icons">smartphone</i> +% } +% if ($wagon->has_family_area) { + <i class="material-icons">people</i> +% } +% if ($wagon->has_bahn_comfort) { + <i class="material-icons">star</i> +% } % } </div> - <div style="position: absolute; left: 7em; right: 0em; + <div style="position: absolute; left: 11em; right: 0em; top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;"> % if ($wagon->is_first_class) { <span style="display: inline-block; width: 0.8em; text-align: center; color: #ffffff; background-color: #666666; border: 1px solid #666666;">1</span> % } -% if ($wagon->is_second_class) { +% elsif ($wagon->is_second_class) { <span style="display: inline-block; width: 0.8em; text-align: center; color: #666666; border: 1px solid #666666;">2</span> % } -% if ($wagon->has_accessibility) { - <i class="material-icons">accessible</i> -% } -% if ($wagon->has_bistro) { - <i class="material-icons">restaurant</i> -% } -% if ($wagon->has_compartments) { - <!--<i class="material-icons">folder</i>--> -% } -% if ($wagon->has_quiet_area) { - <i class="material-icons">volume_off</i> -% } -% if ($wagon->has_phone_area) { - <i class="material-icons">smartphone</i> +% else { + <span style="display: inline-block; width: 0.8em;"></span> % } -% if ($wagon->has_family_area) { - <i class="material-icons">people</i> + <span style="display: inline-block; width: 5em; color: #666666;"> +%= $wagon->type + </span> +% my $uic_id = $wagon->uic_id; +% if (length($uic_id) != 12) { + <span style="color: #666666;"><%= $uic_id %></span> % } -% if ($wagon->has_bahn_comfort) { - <i class="material-icons">star</i> +% elsif ($wr->train_type eq 'ICE') { + <span style="margin-right: 0.2em; color: #999999;"><%= substr($uic_id, 0, 2) %></span><span style="margin-right: 0.2em; color: #999999;"><%= substr($uic_id, 2, 2) %></span><span style="margin-right: 0.2em; color: #999999;"><%= substr($uic_id, 4, 1) %></span><span style="margin-right: 0.2em; font-weight: bold;"><%= substr($uic_id, 5, 3) %></span><span><%= substr($uic_id, 8, 3) %></span><span style="color: #999999;">-<%= substr($uic_id, 11) %></span> % } -% if ($wagon->is_interregio) { - +% else { + <span style="margin-right: 0.2em; color: #999999;"><%= substr($uic_id, 0, 2) %></span><span style="margin-right: 0.2em; color: #999999;"><%= substr($uic_id, 2, 2) %></span><span style="font-weight: bold;"><%= substr($uic_id, 4, 2) %></span>-<span style="margin-right: 0.2em; font-weight: bold;"><%= substr($uic_id, 6, 2) %></span><span><%= substr($uic_id, 8, 3) %></span><span style="color: #999999;">-<%= substr($uic_id, 11) %></span> % } - <span style="color: #999999;"> -%= $wagon->type - </span> </div> % } </div> |