From eb3be788427872f60631078215a82352c490dceb Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 6 Aug 2015 16:08:57 +0200 Subject: fix infoscreen for db backend --- templates/infoscreen.html.ep | 14 ++++++++------ 1 file 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 @@ % 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 @@ FĂ„LLT AUS % } % else { -% if ($departure->countdown > 0) { - <%= $departure->countdown %> min -% } -% else { - sofort +% if ($departure->can('countdown')) { +% if ($departure->countdown > 0) { + <%= $departure->countdown %> min +% } +% else { + sofort +% } % } % } -- cgit v1.2.3