summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Traveling.pm
diff options
context:
space:
mode:
authorCassidy Dingenskirchen <admin@15318.de>2024-01-22 18:53:27 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-01-30 21:04:42 +0100
commit5b3cfd33551deb4ede6ee4e07db95a0570fb412a (patch)
tree021d8e99f851e51317c34e522c4275841c5cb76f /lib/Travelynx/Controller/Traveling.pm
parent88866b3a2921f260fa2de72f1f25390d8d458801 (diff)
add title elements
(cherry picked from commit 5d8f6467dc00f03957784230983ed730ec421291) Signed-off-by: Birte Kristina Friesel <derf@finalrewind.org>
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index d92137b..bc42c32 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -1185,7 +1185,7 @@ sub cancelled {
sub history {
my ($self) = @_;
- $self->render( template => 'history' );
+ $self->render( template => 'history', title => 'travelynx: History' );
}
sub commute {
@@ -1293,6 +1293,7 @@ sub commute {
journeys_by_month => \%journeys_by_month,
count_by_month => \%count_by_month,
total_journeys => $total,
+ title => 'travelynx: Reisen nach Station',
months => [
qw(Januar Februar März April Mai Juni Juli August September Oktober November Dezember)
],
@@ -1390,6 +1391,7 @@ sub map_history {
template => 'history_map',
year => $year,
with_map => 1,
+ title => 'travelynx: Karte',
%{$res}
);
}
@@ -1515,7 +1517,7 @@ sub year_in_review {
$self->render(
'year_in_review',
- title => "travelynx Jahresrückblick $year",
+ title => "travelynx: Jahresrückblick $year",
year => $year,
stats => $stats,
review => $review,
@@ -1586,6 +1588,7 @@ sub yearly_history {
},
any => {
template => 'history_by_year',
+ title => "travelynx: $year",
journeys => [@journeys],
year => $year,
have_review => $with_review,
@@ -1649,6 +1652,8 @@ sub monthly_history {
month => $month
);
+ my $month_name = $months[ $month - 1 ];
+
$self->respond_to(
json => {
json => {
@@ -1658,10 +1663,11 @@ sub monthly_history {
},
any => {
template => 'history_by_month',
+ title => "travelynx: $month_name $year",
journeys => [@journeys],
year => $year,
month => $month,
- month_name => $months[ $month - 1 ],
+ month_name => $month_name,
statistics => $stats
}
);
@@ -1736,6 +1742,9 @@ sub journey_details {
$self->render(
'journey',
+ title => sprintf( 'travelynx: %s %s %s am %s',
+ $journey->{type}, $journey->{line} // '', $journey->{no},
+ $journey->{sched_arrival}->strftime('%d.%m.%Y, %H:%M') ),
error => undef,
journey => $journey,
journey_visibility => $visibility,