From f9d1ea47ff7a444f4468aa4fbfade1120d500066 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 21 Dec 2020 19:11:52 +0100 Subject: keep detailed mode when following links; show train attributes in detailed mode --- templates/_train_details.html.ep | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'templates/_train_details.html.ep') 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 @@ % } % } -% 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})) { +
+ Attribute: + +
+% } +% else { +
+%= include '_train_attr', attr => $details->{commonAttr}, with_station => 0 +
+% } +% } +% if (param('detailed') and $details and not $departure->{arrival}) { % if (my $s = $details->{route}{preStart}) { Zug wird voraussichtlich aus <%= $s %> eingesetzt.

% } @@ -237,7 +254,7 @@ % } % } -% 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.

% } @@ -257,7 +274,7 @@