summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Controller/Stationboard.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-07-03 19:27:20 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-07-03 19:27:20 +0200
commitb1dcf0d582e92f60e7400f7ac477811a5d351945 (patch)
tree9c94213771767c424afd6b2c898da02c51826064 /lib/DBInfoscreen/Controller/Stationboard.pm
parent83a1be4735db1f1736e7a7d6465a4d7ac4d7aa59 (diff)
set appropriate meta description for departure board and train details
Diffstat (limited to 'lib/DBInfoscreen/Controller/Stationboard.pm')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm18
1 files changed, 18 insertions, 0 deletions
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,