% if ($self->stash('refresh_interval')) {
% }
%= stylesheet '/infoscreen.css'
%= javascript '/jquery-2.1.1.min.js'
% if (my $error = stash 'error') {
Received an error from the backend service:
% }
% for my $departure (@{$raw}) {
% my $linetype = q{};
% 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' }
% }
% }
-
%= $departure->line
% if ($departure->can('route_interesting') and $departure->route_interesting) {
%= join(' - ', map { $_->{stop_suf} } ($departure->route_interesting));
% }
% elsif ($departure->can('lineref') and $departure->lineref) {
%= $departure->lineref->route
% }
% elsif ($departure->can('route_timetable')) {
% my @first_deps = ($departure->route_timetable)[0..2];
% delete $first_deps[2] unless defined $first_deps[2];
% delete $first_deps[1] unless defined $first_deps[1];
% delete $first_deps[0] unless defined $first_deps[0];
%= join(' - ', map { $_->[1] } @first_deps );
% }
%= $departure->destination
% if ($departure->can('delay') and $departure->delay) {
(+<%= $departure->delay %>)
% }
% if ($departure->can('is_cancelled') and $departure->is_cancelled) {
FĂ„LLT AUS
% }
% else {
% if ($departure->countdown > 0) {
<%= $departure->countdown %> min
% }
% else {
sofort
% }
% }
%= $departure->time
% }