diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-08-06 16:08:57 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-08-06 16:08:57 +0200 |
commit | eb3be788427872f60631078215a82352c490dceb (patch) | |
tree | f8d38e873ae2fb4e700c24b99c84708737ad6759 | |
parent | 9765a97011272bde005dd96a43d10e7e887ded0b (diff) |
fix infoscreen for db backend
-rw-r--r-- | templates/infoscreen.html.ep | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index 54b1605..4a4f309 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -107,7 +107,7 @@ </span> <!-- moreinfo --> <span class="route"> % if ($departure->can('route_interesting') and $departure->route_interesting) { -%= join(' - ', map { $_->name_suf } ($departure->route_interesting)); +%= join(' - ', map { ref($_) ? $_->name_suf : $_ } ($departure->route_interesting)); % } % elsif ($departure->can('lineref') and $departure->lineref) { %= $departure->lineref->route @@ -131,11 +131,13 @@ <span class="delay"> FĂ„LLT AUS </span> % } % else { -% if ($departure->countdown > 0) { - <%= $departure->countdown %> min -% } -% else { - sofort +% if ($departure->can('countdown')) { +% if ($departure->countdown > 0) { + <%= $departure->countdown %> min +% } +% else { + sofort +% } % } % } </span> <!-- countdown --> |