From 87386d0c11ac4044fc29c5780a6635411df00eb7 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 6 Oct 2024 09:06:38 +0200 Subject: EFA: Clickable route links --- lib/DBInfoscreen/Controller/Stationboard.pm | 5 +++-- templates/_train_details.html.ep | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 417fa0c..34a9efd 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -1556,6 +1556,7 @@ sub handle_efa { ( $delay and $delay > 0 and $delay < 5 ? 1 : 0 ), is_delayed => ( $delay and $delay >= 5 ? 1 : 0 ), occupancy => $result->occupancy, + station => $efa->stop->id, replaced_by => [], replacement_for => [], route_pre => [ map { $_->full_name } $result->route_pre ], @@ -1569,9 +1570,9 @@ sub handle_efa { $template, description => "Abfahrtstafel $station_name", departures => \@departures, - station => $station_name, + station => $efa->stop->name,, version => $self->config->{version}, - title => $station_name, + title => $efa->stop->name // $station_name, refresh_interval => $template eq 'app' ? 0 : 120, hide_opts => $hide_opts, hide_low_delay => $hide_low_delay, diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index fd18623..a02336b 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -252,7 +252,7 @@ % }
  • - $stop->{eva} // $stop->{name})->query({detailed => param('detailed'), past => param('past'), rt => param('rt'), efa => param('efa'), hafas => param('hafas')}) %>#<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>" class=" % if ($stop->{isAdditional}) { additional-stop % } @@ -347,7 +347,7 @@
  • % }
  • - $stop->{eva} // $stop->{name})->query({detailed => param('detailed'), past => param('past'), rt => param('rt'), efa => param('efa'), hafas => param('hafas')}) %>#<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>" class=" % if ($stop->{isAdditional}) { additional-stop % } -- cgit v1.2.3