diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-06-04 17:47:17 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-06-04 17:47:17 +0200 |
commit | de562c55b1d67582f3102aae71fe02dd2ebd0242 (patch) | |
tree | 31b7135a229544fa5a69410d228b2c342ad6d4b3 /templates | |
parent | 2ee8361d3ce7371e07d7d30ba071996562fb8eae (diff) |
infoscreen CSS: incorporate impromevents made in dbf
Diffstat (limited to 'templates')
-rw-r--r-- | templates/infoscreen.html.ep | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index 4ca6ad5..1fdada3 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -24,54 +24,54 @@ <div class="displayclean"> <ul> % 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' } +% 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' } +% } % } -% } -<li> -<span class="line <%= $linetype %>"> -%= $departure->line -</span> -<span class="route"> -% if ($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 ); -% } -</span> -<span class="dest"> -%= $departure->destination -</span> -<span class="countdown"> -% if ($departure->can('delay') and $departure->delay) { -<span class="delay"> (+<%= $departure->delay %>) </span> -% } -% if ($departure->can('is_cancelled') and $departure->is_cancelled) { -<span class="delay"> FÄLLT AUS </span> -% } -% else { -% if ($departure->countdown > 0) { -<%= $departure->countdown %> min -% } -% else { -sofort -% } -% } -</span> -<span class="time"> -%= $departure->time -</span> -</li> + <li> + <span class="line <%= $linetype %>"> + %= $departure->line + </span> <!-- line --> + <span class="route"> +% if ($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 ); +% } + </span> <!-- route --> + <span class="dest"> +%= $departure->destination + </span> <!-- dest --> + <span class="countdown"> +% if ($departure->can('delay') and $departure->delay) { + <span class="delay"> (+<%= $departure->delay %>) </span> +% } +% if ($departure->can('is_cancelled') and $departure->is_cancelled) { + <span class="delay"> FÄLLT AUS </span> +% } +% else { +% if ($departure->countdown > 0) { + <%= $departure->countdown %> min +% } +% else { + sofort +% } +% } + </span> <!-- countdown --> + <span class="time"> +%= $departure->time + </span> + </li> % } </ul> </div> |