diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-10-03 13:45:32 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-10-03 13:45:32 +0200 |
commit | 9eee6acb5fae593c2789be0576cfc8aff95263c9 (patch) | |
tree | 49f556892d6d1eeb88e48f5ae52981bc4c0156ec | |
parent | 3ef3ead013d5fa26b5fffaec253f2eb6255815bd (diff) |
add platform data to infoscreen detail view1.00
-rw-r--r-- | index.pl | 15 | ||||
-rw-r--r-- | templates/clean.html.ep | 17 |
2 files changed, 23 insertions, 9 deletions
@@ -663,13 +663,14 @@ sub handle_request { push( @departures, { - time => $time, - train => $result->train, - train_type => $result->type, - destination => $result->destination, - platform => $platform, - info => $info, - is_cancelled => $result->can('is_cancelled') + time => $time, + train => $result->train, + train_type => $result->type, + destination => $result->destination, + platform => $platform, + changed_platform => $result->is_changed_platform, + info => $info, + is_cancelled => $result->can('is_cancelled') ? $result->is_cancelled : undef, messages => { diff --git a/templates/clean.html.ep b/templates/clean.html.ep index 43f3c54..1a1f847 100644 --- a/templates/clean.html.ep +++ b/templates/clean.html.ep @@ -76,6 +76,18 @@ <div class="minfo">+<%= $departure->{delay} %></div> % } </div> <!-- mheader --> + <div class="platforminfo"> +% if ($departure->{platform}) { + Gleis <%= $departure->{platform} %> +% } +% if ($departure->{scheduled_platform} and $departure->{platform} +% and $departure->{scheduled_platform} ne $departure->{platform}) { + (nicht Gleis <%= $departure->{scheduled_platform} %>) +% } +% elsif ($departure->{changed_platform}) { + (Gleiswechsel) +% } + </div> <!-- platforminfo --> % if (not $departure->{is_cancelled}) { <div class="timeinfo"> % if ($departure->{sched_arrival}) { @@ -203,8 +215,9 @@ % } % } % } -% if ($departure->{scheduled_platform} and $departure->{platform} and -% $departure->{scheduled_platform} ne $departure->{platform}) { +% if (($departure->{scheduled_platform} and $departure->{platform} and +% $departure->{scheduled_platform} ne $departure->{platform}) +% or $departure->{changed_platform}) { <span class="platform changed-platform"> % } % else { |