summaryrefslogtreecommitdiff
path: root/templates/wagenreihung.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-12-23 16:57:25 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-12-23 16:57:25 +0100
commitb070290bfd7999b43a094fcaaf9feb32a0d870cd (patch)
tree0864525e2c20ad60380df378251afc2e53690480 /templates/wagenreihung.html.ep
parentf6a19ee49e34987a90aa704c43ef16f44b0d744f (diff)
wagon order: distinguish between requested train and wings, show dest sections
Diffstat (limited to 'templates/wagenreihung.html.ep')
-rw-r--r--templates/wagenreihung.html.ep17
1 files changed, 16 insertions, 1 deletions
diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep
index f67fb15..85557a1 100644
--- a/templates/wagenreihung.html.ep
+++ b/templates/wagenreihung.html.ep
@@ -7,12 +7,23 @@
</div>
% }
% else {
+ % my $has_multi_dest = 0;
+ % if (scalar $wr->destinations > 1) {
+ % $has_multi_dest = 1;
+ % }
<div class="container">
<div style="text-align: center;">
%= join( ' / ', $wr->origins )
%= join( ' / ', map { $_->{name} } $wr->destinations )
</div>
+ % if ($has_multi_dest) {
+ <div style="text-align: center;">
+ % for my $destination ($wr->destinations) {
+ Nach <%= $destination->{name} %> in Abschnitt <%= join(q{}, sort @{$destination->{sections} // []}) %><br/>
+ % }
+ </div>
+ % }
<%= $wr->station_name %> Gleis <%= $wr->platform %><br/>
% if ($wr->train_type =~ m{^IC|EC}) {
Zugtyp: <%= $wr->train_subtype // 'IC?' %>
@@ -51,13 +62,17 @@
% }
% for my $wagon ($wr->wagons) {
% my $bg = '';
+% my $extra_class = '';
% if ($wagon->is_first_class) {
% $bg = 'background-color: #ffff99;';
% }
% if ($wagon->is_locomotive or $wagon->is_powercar) {
% $bg = 'background-color: #cccccc;';
% }
- <div class="wagon" style="
+% if ($has_multi_dest and $wagon->train_no ne $train_no) {
+% $extra_class .= ' nondestwagon';
+% }
+ <div class="wagon <%= $extra_class %>" style="
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%; <%= $bg %>">
% if ($wagon->is_locomotive or $wagon->is_powercar) {
% }