diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-05 09:22:59 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-05 09:22:59 +0200 | 
| commit | 754719a87ad90bde4cb7406ef6f7874915375be7 (patch) | |
| tree | 77bca0cc8d44b4a0bc08db0cc6d247fc56a58647 | |
| parent | 084f3d05b4c0b3d1c795080364f4563674218d07 (diff) | |
show all known operators4.24.1
| -rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 8 | ||||
| -rw-r--r-- | 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 @@  %       }        </ul> <!-- mroute -->  %   } -%   if ($departure->{operator}) { -     <div class="details">Betrieb: <%= $departure->{operator} %></div> +%   if ($departure->{operators} and @{$departure->{operators} // []}) { +     <div class="details">Betrieb: <%= join(q{, }, @{ $departure->{operators} // [] } ) %></div>  %   }  %   if ($departure->{details} and @{$departure->{details}}) {        <div class="details">Details: | 
