From 772b4e3b23b10d3d628c29fac7a4eab6d05d686a Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 14 Aug 2024 22:03:48 +0200 Subject: [PATCH] journey: show beeline if route is unavailable --- templates/journey.html.ep | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/journey.html.ep b/templates/journey.html.ep index fc2b56d..492335c 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -133,6 +133,9 @@ ca. <%= sprintf_km($journey->{km_route}) %> (Luftlinie: <%= sprintf_km($journey->{km_beeline}) %>) % } + % elsif ($journey->{km_beeline} > 0.1) { + (Luftlinie: <%= sprintf_km($journey->{km_beeline}) %>) + % } % else { ? % } @@ -155,6 +158,9 @@ ∗ % } % } + % elsif ($journey->{km_beeline} > 0.1 and $journey->{kmh_beeline} > 0.01) { + (<%= sprintf('%.f', $journey->{kmh_beeline}) %> km/h) + % } % else { ? % }