From 754719a87ad90bde4cb7406ef6f7874915375be7 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 5 Apr 2024 09:22:59 +0200 Subject: show all known operators --- lib/DBInfoscreen/Controller/Stationboard.pm | 8 ++++---- templates/_train_details.html.ep | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index b0f367e..f1f51da 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -856,9 +856,9 @@ sub render_train { sub { my ( $route, $journey ) = @_; - $departure->{trip_id} = $journey->id; - $departure->{operator} = $journey->operator; - $departure->{date} = $route->[0]{sched_dep} // $route->[0]{dep}; + $departure->{trip_id} = $journey->id; + $departure->{operators} = [ $journey->operators ]; + $departure->{date} = $route->[0]{sched_dep} // $route->[0]{dep}; # Use HAFAS route as source of truth; ignore IRIS data $departure->{route_pre_diff} = []; @@ -1209,7 +1209,7 @@ sub train_details { $res->{origin} = $journey->route_start; $res->{destination} = $journey->route_end; - $res->{operator} = $journey->operator; + $res->{operators} = [ $journey->operators ]; $res->{route_post_diff} = $route; diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 2b51d3c..2f89cde 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -376,8 +376,8 @@ % } % } -% if ($departure->{operator}) { -
Betrieb: <%= $departure->{operator} %>
+% if ($departure->{operators} and @{$departure->{operators} // []}) { +
Betrieb: <%= join(q{, }, @{ $departure->{operators} // [] } ) %>
% } % if ($departure->{details} and @{$departure->{details}}) {
Details: -- cgit v1.2.3