From b1dcf0d582e92f60e7400f7ac477811a5d351945 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 3 Jul 2023 19:27:20 +0200 Subject: set appropriate meta description for departure board and train details --- lib/DBInfoscreen/Controller/Stationboard.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/DBInfoscreen') diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index fd7ed37..912d95d 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -958,6 +958,14 @@ sub render_train { sub { $self->render( $template // '_train_details', + description => sprintf( + '%s %s%s%s nach %s', + $departure->{train_type}, + $departure->{train_line} // $departure->{train_no}, + $departure->{origin} ? ' von ' : q{}, + $departure->{origin} // q{}, + $departure->{destination} // 'unbekannt' + ), departure => $departure, linetype => $linetype, icetype => $self->app->ice_type_map->{ $departure->{train_no} }, @@ -1279,6 +1287,14 @@ sub train_details { $self->render( $self->param('ajax') ? '_train_details' : 'train_details', + description => sprintf( + '%s %s%s%s nach %s', + $res->{train_type}, + $res->{train_line} // $res->{train_no}, + $res->{origin} ? ' von ' : q{}, + $res->{origin} // q{}, + $res->{destination} // 'unbekannt' + ), departure => $res, linetype => $linetype, icetype => $self->app->ice_type_map->{ $res->{train_no} }, @@ -1735,6 +1751,8 @@ sub handle_result { } $self->render( $template, + description => 'Abfahrtstafel ' + . ( $via ? "$station_name via $via" : $station_name ), api_link => $api_link, api_text => $api_text, api_icon => $api_icon, -- cgit v1.2.3