diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-12-23 16:57:25 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-12-23 16:57:25 +0100 |
commit | b070290bfd7999b43a094fcaaf9feb32a0d870cd (patch) | |
tree | 0864525e2c20ad60380df378251afc2e53690480 | |
parent | f6a19ee49e34987a90aa704c43ef16f44b0d744f (diff) |
wagon order: distinguish between requested train and wings, show dest sections
-rw-r--r-- | lib/DBInfoscreen/Controller/Wagenreihung.pm | 1 | ||||
-rw-r--r-- | public/static/css/app.css | 8 | ||||
-rw-r--r-- | public/static/css/material-icons.css | 8 | ||||
l--------- | public/static/v22 (renamed from public/static/v20) | 0 | ||||
-rw-r--r-- | templates/layouts/app.html.ep | 2 | ||||
-rw-r--r-- | templates/layouts/legacy.html.ep | 2 | ||||
-rw-r--r-- | templates/wagenreihung.html.ep | 17 |
7 files changed, 31 insertions, 7 deletions
diff --git a/lib/DBInfoscreen/Controller/Wagenreihung.pm b/lib/DBInfoscreen/Controller/Wagenreihung.pm index 99c6bce..8816dda 100644 --- a/lib/DBInfoscreen/Controller/Wagenreihung.pm +++ b/lib/DBInfoscreen/Controller/Wagenreihung.pm @@ -32,6 +32,7 @@ sub wagenreihung { 'wagenreihung', title => join( ' / ', map { $wr->train_type . ' ' . $_ } $wr->train_numbers ), + train_no => $train, wr => $wr, hide_opts => 1, ); diff --git a/public/static/css/app.css b/public/static/css/app.css index ef2b2e9..cb7e0da 100644 --- a/public/static/css/app.css +++ b/public/static/css/app.css @@ -55,6 +55,10 @@ div.content { border-top: none; } +.wagonorder .wagon .material-icons { + color: #666666; +} + .wagonorder .wagon .direction { position: absolute; left: 0.2em; @@ -64,6 +68,10 @@ div.content { color: #666666; } +.wagonorder .nondestwagon { + border-style: dashed; +} + .wagonorder .details { position: absolute; padding-top: 0.5ex; diff --git a/public/static/css/material-icons.css b/public/static/css/material-icons.css index be41671..3eb6a34 100644 --- a/public/static/css/material-icons.css +++ b/public/static/css/material-icons.css @@ -2,12 +2,12 @@ font-family: 'Material Icons'; font-style: normal; font-weight: 400; - src: url(/static/v21/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */ + src: url(/static/v22/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */ src: local('Material Icons'), local('MaterialIcons-Regular'), - url(/static/v21/fonts/MaterialIcons-Regular.woff2) format('woff2'), - url(/static/v21/fonts/MaterialIcons-Regular.woff) format('woff'), - url(/static/v21/fonts/MaterialIcons-Regular.ttf) format('truetype'); + url(/static/v22/fonts/MaterialIcons-Regular.woff2) format('woff2'), + url(/static/v22/fonts/MaterialIcons-Regular.woff) format('woff'), + url(/static/v22/fonts/MaterialIcons-Regular.ttf) format('truetype'); } .material-icons { diff --git a/public/static/v20 b/public/static/v22 index 945c9b4..945c9b4 120000 --- a/public/static/v20 +++ b/public/static/v22 diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index 2b2bf79..a5415dc 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -18,7 +18,7 @@ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/> % } - % my $av = 'v21'; # asset version + % my $av = 'v22'; # asset version %= stylesheet "/static/${av}/css/app.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep index e74d2e5..f071ae6 100644 --- a/templates/layouts/legacy.html.ep +++ b/templates/layouts/legacy.html.ep @@ -17,7 +17,7 @@ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/> % } - % my $av = 'v21'; # asset version + % my $av = 'v22'; # asset version %= stylesheet "/static/${av}/css/default.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" 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) { % } |