% if ($self->stash('refresh_interval')) {
% }
%= stylesheet '/static/infoscreen.css'
% if ($self->browser->mobile) {
%= stylesheet '/static/mobile.css'
% }
%= javascript '/static/jquery-2.1.1.min.js'
%= javascript '/static/collapse.js'
% if (my $error = stash 'errstr') {
Received an error from the backend service:
% }
% for my $departure (@{$raw}) {
% my $linetype = q{};
% if ($departure->can('type')) {
% given ($departure->type) {
% when ($_ =~ m{ (?: enbahn $ ) | Tram | STR }ix) { $linetype = 'tram' }
% when ([qw[S-Bahn S]]) { $linetype = 'sbahn' }
% when ([qw[NE Niederflurbus SB Bus]]) { $linetype = 'bus' }
% when ([qw[U-Bahn U]]) { $linetype = 'ubahn' }
% }
% }
-
% if ($departure->can('line_no')) {
% if ($linetype eq 'sbahn') {
S
% }
%= $departure->line_no
% }
% else {
% my $line = $departure->line;
% if ($line =~ m{^IC}) {
% $line = join(q{ }, (split(qr{ }, $line))[0,1]);
% }
%= $line;
% }
% if ($departure->can('route_interesting') and $departure->route_interesting) {
%= join(' - ', map { $_->can('name_suf') ? $_->name_suf : $_->name } ($departure->route_interesting));
% }
% elsif ($departure->can('lineref') and $departure->lineref) {
%= $departure->lineref->route
% }
%= $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->can('countdown')) {
% if ($departure->countdown > 1) {
<%= $departure->countdown - 1 %> min
% }
% else {
sofort
% }
% }
% }
% if ($departure->can('sched_time')) {
%= $departure->sched_time
% }
% else {
%= $departure->time
% }
% if ($departure->can('platform') and $departure->platform) {
%= $departure->platform
% }
% }