From 2b795a4e87db14ca9e4e631e461171285db0d8b2 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 2 May 2015 11:15:53 +0200 Subject: index: show replacement train information in template != clean as well --- index.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.pl b/index.pl index f779291..652ea60 100644 --- a/index.pl +++ b/index.pl @@ -250,6 +250,16 @@ sub handle_request { $result->delay, $delaymsg ? q{: } : q{}, $delaymsg ); } } + if ( $result->replacement_for and $template ne 'clean') { + for my $rep ($result->replacement_for) { + $info = sprintf('Ersatzzug für %s %s %s%s', + $rep->type, + $rep->train_no, + $info ? '+++ ' : q{}, + $info // q{} + ); + } + } if ( $info and $qosmsg ) { $info .= ' +++ '; } -- cgit v1.2.3