summaryrefslogtreecommitdiff
path: root/templates/_train_details.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-20 19:10:15 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-20 19:10:15 +0100
commit5a41f843f1d7f57237938712ac08cf5b94450749 (patch)
tree8b045748807bc88ac96a5bf990dca331db8156c1 /templates/_train_details.html.ep
parent2016a340657bf477ac85a344b8d8a8f8f7563663 (diff)
show zugbildung (if available); show scheduled wagon order for nightjets too3.8.0
Diffstat (limited to 'templates/_train_details.html.ep')
-rw-r--r--templates/_train_details.html.ep42
1 files changed, 41 insertions, 1 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index a1299ac..55daae3 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -116,7 +116,7 @@
<a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>"><i class="material-icons" aria-hidden="true">train</i> Wagenreihung
</a>
% }
-% elsif ($icetype and $icetype->[2] and $linetype eq 'fern') {
+% elsif ($icetype and $icetype->[2] and ($linetype eq 'fern' or $departure->{train_type} =~ m{NJ})) {
<a class="smallbutton" href="/wr/<%= $departure->{train_no} %>"><i class="material-icons" aria-hidden="true">train</i> Plan: <%= $icetype->[0] %></a>
% }
% elsif ($icetype and $icetype->[1] and $linetype eq 'fern') {
@@ -228,4 +228,44 @@
% }
</ul> <!-- mroute -->
% }
+% if ($details and not $departure->{arrival}) {
+% if (my $s = $details->{route}{preStart}) {
+ Zug wird voraussichtlich aus <%= $s %> eingesetzt.<br/><br/>
+% }
+% if ($details->{cycle}{from}) {
+ Bildung möglicherweise aus
+ <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';
+% $tt =~ s{ .*|[0-9]}{};
+ <li><%= $tt %> <%= $train_no %>
+% if ($train->{route}{start} and $train->{route}{end}) {
+ <%= $train->{route}{start} %> → <%= $train->{route}{end} %>
+% }
+ </li>
+% }
+ </ul>
+% }
+% }
+% elsif ($details and not $departure->{departure}) {
+% if (my $e = $details->{route}{postEnd}) {
+ Zug wird voraussichtlich in <%= $e %> abgestellt.<br/><br/>
+% }
+% if ($details->{cycle}{to}) {
+ Weiterfahrt möglicherweise als
+ <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';
+% $tt =~ s{ .*|[0-9]}{};
+ <li><%= $tt %> <%= $train_no %>
+% if ($train->{route}{start} and $train->{route}{end}) {
+ <%= $train->{route}{start} %> → <%= $train->{route}{end} %>
+% }
+ </li>
+% }
+ </ul>
+% }
+% }
</div> <!-- mfooter -->