summaryrefslogtreecommitdiff
path: root/templates
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
parentf6a19ee49e34987a90aa704c43ef16f44b0d744f (diff)
wagon order: distinguish between requested train and wings, show dest sections
Diffstat (limited to 'templates')
-rw-r--r--templates/layouts/app.html.ep2
-rw-r--r--templates/layouts/legacy.html.ep2
-rw-r--r--templates/wagenreihung.html.ep17
3 files changed, 18 insertions, 3 deletions
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) {
% }