From 96ec1a652d9c09a9f41d88f7cb344b8302e1fd99 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 10 Oct 2015 12:33:37 +0200 Subject: infoscreen: more fancy line support --- templates/infoscreen.html.ep | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index bb6c565..fac78d4 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -29,14 +29,22 @@ % if ($departure->can('type')) { % given ($departure->type) { % when ($_ =~ m{ (?: enbahn $ ) | Tram | STR }ix) { $linetype = 'tram' } -% when ('S-Bahn') { $linetype = 'sbahn' } +% when ([qw[S-Bahn S]]) { $linetype = 'sbahn' } % when ([qw[NE Niederflurbus SB Bus]]) { $linetype = 'bus' } -% when ('U-Bahn') { $linetype = 'ubahn' } +% when ([qw[U-Bahn U]]) { $linetype = 'ubahn' } % } % }
  • - %= $departure->line +% if ($departure->can('line_no')) { +% if ($linetype eq 'sbahn') { + S +% } +%= $departure->line_no +% } +% else { +%= $departure->line +% }