diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-01-15 17:52:48 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-01-15 17:52:48 +0100 |
commit | c7aa0f86a873a3f86d5eab1be4a0d40d49181b00 (patch) | |
tree | aae7a63ad55722cec8733f771ceb094da243b698 /templates | |
parent | 334cdd809e665db47dde838765c2669f9a52d3cf (diff) |
initial ASEAG support (more to follow)
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"> |