From b070290bfd7999b43a094fcaaf9feb32a0d870cd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 23 Dec 2019 16:57:25 +0100 Subject: wagon order: distinguish between requested train and wings, show dest sections --- lib/DBInfoscreen/Controller/Wagenreihung.pm | 1 + public/static/css/app.css | 8 ++++++++ public/static/css/material-icons.css | 8 ++++---- public/static/v20 | 1 - public/static/v22 | 1 + templates/layouts/app.html.ep | 2 +- templates/layouts/legacy.html.ep | 2 +- templates/wagenreihung.html.ep | 17 ++++++++++++++++- 8 files changed, 32 insertions(+), 8 deletions(-) delete mode 120000 public/static/v20 create mode 120000 public/static/v22 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/v20 deleted file mode 120000 index 945c9b4..0000000 --- a/public/static/v20 +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file diff --git a/public/static/v22 b/public/static/v22 new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/public/static/v22 @@ -0,0 +1 @@ +. \ No newline at end of file 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 @@ % } - % 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 @@ % } - % 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 @@ % } % else { + % my $has_multi_dest = 0; + % if (scalar $wr->destinations > 1) { + % $has_multi_dest = 1; + % }
%= join( ' / ', $wr->origins ) → %= join( ' / ', map { $_->{name} } $wr->destinations )
+ % if ($has_multi_dest) { +
+ % for my $destination ($wr->destinations) { + Nach <%= $destination->{name} %> in Abschnitt <%= join(q{}, sort @{$destination->{sections} // []}) %>
+ % } +
+ % } <%= $wr->station_name %> Gleis <%= $wr->platform %>
% 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;'; % } -
" style=" top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%; <%= $bg %>"> % if ($wagon->is_locomotive or $wagon->is_powercar) { % } -- cgit v1.2.3