diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_train_details.html.ep | 25 | ||||
-rw-r--r-- | templates/layouts/app.html.ep | 2 | ||||
-rw-r--r-- | templates/layouts/legacy.html.ep | 2 |
3 files changed, 23 insertions, 6 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 4b85845..fc77d27 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -228,7 +228,24 @@ % } </ul> <!-- mroute --> % } -% if ($details and not $departure->{arrival}) { +% if (param('detailed') and $details->{commonAttr}) { +% if ($details->{attrVariants} and (not $details->{commonAttr}{vmax} or not $details->{commonAttr}{brakingPercentage})) { + <div class="db-attr"> + Attribute: + <ul> +% for my $attr (@{$details->{attrVariants} // [] }) { + <li><%= include '_train_attr', attr => $attr, with_station => 1 %></li> +% } + </ul> + </div> +% } +% else { + <div class="db-attr"> +%= include '_train_attr', attr => $details->{commonAttr}, with_station => 0 + </div> +% } +% } +% if (param('detailed') and $details and not $departure->{arrival}) { % if (my $s = $details->{route}{preStart}) { Zug wird voraussichtlich aus <%= $s %> eingesetzt.<br/><br/> % } @@ -237,7 +254,7 @@ <ul> % for my $train_no (sort {$a <=> $b} @{ $details->{cycle}{from} // [] }) { % my $train = app->train_details_db->{$train_no}; -% my $tt = $train->{type} // $train->{raw} // 'Zug'; +% my $tt = $train->{type} // $train->{rawType} // 'Zug'; % $tt =~ s{ .*|[0-9]}{}; <li><%= $tt %> <%= $train_no %> % if ($train->{route}{start} and $train->{route}{end}) { @@ -248,7 +265,7 @@ </ul> % } % } -% elsif ($details and not $departure->{departure}) { +% elsif (param('detailed') and $details and not $departure->{departure}) { % if (my $e = $details->{route}{postEnd}) { Zug wird voraussichtlich in <%= $e %> abgestellt.<br/><br/> % } @@ -257,7 +274,7 @@ <ul> % for my $train_no (sort {$a <=> $b} @{ $details->{cycle}{to} // [] }) { % my $train = app->train_details_db->{$train_no}; -% my $tt = $train->{type} // $train->{raw} // 'Zug'; +% my $tt = $train->{type} // $train->{rawType} // 'Zug'; % $tt =~ s{ .*|[0-9]}{}; <li><%= $tt %> <%= $train_no %> % if ($train->{route}{start} and $train->{route}{end}) { diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index e7106dc..4069432 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 = 'v41'; # asset version + % my $av = 'v42'; # asset version % if (session('theme') and session('theme') eq 'dark' or param('dark')) { %= stylesheet "/static/${av}/css/dark.min.css", id => 'theme' % } diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep index ab63e80..1ea4b67 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 = 'v41'; # asset version + % my $av = 'v42'; # asset version %= stylesheet "/static/${av}/css/default.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" |