From 0cbfcf55948c1ec953a39942b47a1b60a276d572 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 9 Jan 2023 18:38:50 +0100 Subject: Re-add train attributes --- templates/_train_attr.html.ep | 16 ++++++---------- templates/_train_details.html.ep | 8 ++++---- 2 files changed, 10 insertions(+), 14 deletions(-) (limited to 'templates') diff --git a/templates/_train_attr.html.ep b/templates/_train_attr.html.ep index 4f7e9ca..dad21e4 100644 --- a/templates/_train_attr.html.ep +++ b/templates/_train_attr.html.ep @@ -1,19 +1,15 @@ -% if ($attr->{series}) { - BR <%= $attr->{series} %> -% if ($attr->{series2}) { - + <%= $attr->{series2} %> -% } - +% if ($attr->{vmax}) { + <%= $attr->{vmax} %> km/h % } % if ($attr->{length}) { ⇤ <%= $attr->{length} %>m ⇥ % } -% if ($attr->{vmax}) { - <%= $attr->{vmax} %> km/h +% if ($attr->{weight}) { + <%= $attr->{weight} %>t % } % if ($attr->{brakingPercentage}) { λ=<%= $attr->{brakingPercentage} %> % } -% if ($attr->{station} and $with_station) { - ab <%= $attr->{station} %> +% if ($with_station and $attr->{range}[0]) { + ab <%= $attr->{range}[0] %> % } diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 167068e..0484388 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -324,12 +324,12 @@
Umlaufplan (ggf. fehlerhaft)
% } -% if ($details->{commonAttr}) { -% if ($details->{attrVariants} and (not $details->{commonAttr}{vmax} or not $details->{commonAttr}{brakingPercentage})) { +% if ($details->{attributes}) { +% if (@{$details->{attributes}} > 1) {
Attribute: @@ -337,7 +337,7 @@ % } % else {
-%= include '_train_attr', attr => $details->{commonAttr}, with_station => 0 +%= include '_train_attr', attr => $details->{attributes}[0], with_station => 0
% } % } -- cgit v1.2.3