diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-01-01 12:58:59 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-01-01 12:58:59 +0100 |
commit | 2c229c0317dece4c80b5ca610fa80d5fba50eabd (patch) | |
tree | 53a9cedc9941fcdd9766618ca238c70b91e397d6 /lib | |
parent | b71203738cc7df72773b736629362c4fbb6b083a (diff) |
map: show year in headline if set
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index dcfd36b..ac14c76 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -1342,6 +1342,18 @@ sub map_history { $filter_until = undef; } + my $year; + if ( $filter_from + and $filter_from->day == 1 + and $filter_from->month == 1 + and $filter_until + and $filter_until->day == 31 + and $filter_until->month == 12 + and $filter_from->year == $filter_until->year ) + { + $year = $filter_from->year; + } + my @journeys = $self->journeys->get( uid => $self->current_user->{id}, with_polyline => $with_polyline, @@ -1376,6 +1388,7 @@ sub map_history { $self->render( template => 'history_map', + year => $year, with_map => 1, %{$res} ); |