diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/infoscreen.html.ep | 18 | ||||
-rw-r--r-- | templates/main.html.ep | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index 47c435c..6d4ff72 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -25,18 +25,20 @@ <ul> % for my $departure (@{$raw}) { % my $linetype = q{}; -% given ($departure->type) { -% when ($_ =~ m{enbahn$}) { $linetype = 'tram' } -% when ('S-Bahn') { $linetype = 'sbahn' } -% when ([qw[NE Niederflurbus SB Bus]]) { $linetype = 'bus' } -% when ('U-Bahn') { $linetype = 'ubahn' } +% if ($departure->can('type')) { +% given ($departure->type) { +% when ($_ =~ m{enbahn$}) { $linetype = 'tram' } +% when ('S-Bahn') { $linetype = 'sbahn' } +% when ([qw[NE Niederflurbus SB Bus]]) { $linetype = 'bus' } +% when ('U-Bahn') { $linetype = 'ubahn' } +% } % } <li> <span class="line <%= $linetype %>"> %= $departure->line </span> <span class="route"> -% if ($departure->lineref) { +% if ($departure->can('lineref') and $departure->lineref) { %= $departure->lineref->route % } </span> @@ -44,10 +46,10 @@ %= $departure->destination </span> <span class="countdown"> -% if ($departure->delay) { +% if ($departure->can('delay') and $departure->delay) { <span class="delay"> (+<%= $departure->delay %>) </span> % } -% if ($departure->is_cancelled) { +% if ($departure->can('is_cancelled') and $departure->is_cancelled) { <span class="delay"> FĂ„LLT AUS </span> % } % else { diff --git a/templates/main.html.ep b/templates/main.html.ep index 8f42291..a3678de 100644 --- a/templates/main.html.ep +++ b/templates/main.html.ep @@ -131,7 +131,7 @@ other German transit networks. <div class="field"> <div class="desc">backend</div> <div> - %= select_field backend => [['EFA (VRR)' => 'vrr'], ['HAFAS (DB)' => 'db']] + %= select_field backend => [['EFA / VRR' => 'vrr'], ['DB (HAFAS)' => 'db'], ['ASEAG (URA)' => 'aseag']] </div> </div> <div class="field"> |