summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Traveling.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-02-23 19:04:05 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-02-23 19:04:05 +0100
commit5c05ed609f3033fa97ec00089ed6885034ad9405 (patch)
treed0b1edf39cd4f0bbccca70d48e00d4db3cd17a9e /lib/Travelynx/Controller/Traveling.pm
parent82f043e734cfbe1f166a4864afc5db5eb19080f9 (diff)
journey details: show route on map if available1.15.1
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index d830d2b..37fad09 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -119,12 +119,18 @@ sub user_status {
if ( not $user->{public_level} & 0x04 ) {
delete $journey->{user_data}{comment};
}
+ my $map_data = $self->journeys_to_map_data(
+ journeys => [$journey],
+ include_manual => 1,
+ );
$self->render(
'journey',
error => undef,
+ with_map => 1,
readonly => 1,
journey => $journey,
twitter => \%tw_data,
+ %{$map_data},
);
}
else {
@@ -665,10 +671,16 @@ sub journey_details {
);
if ($journey) {
+ my $map_data = $self->journeys_to_map_data(
+ journeys => [$journey],
+ include_manual => 1,
+ );
$self->render(
'journey',
- error => undef,
- journey => $journey,
+ error => undef,
+ journey => $journey,
+ with_map => 1,
+ %{$map_data},
);
}
else {