summaryrefslogtreecommitdiff
path: root/templates/journey.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-20 18:33:51 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-20 18:33:51 +0100
commit0a9d2e4c88f46fb8f5ea91009b16c84403d546e2 (patch)
tree0454dd9c02205a00d537d24ac9d76e3ef1f9bfe4 /templates/journey.html.ep
parent2366b193fef9f0118d08071f564a446733dcfb33 (diff)
journey: show average speed
Diffstat (limited to 'templates/journey.html.ep')
-rw-r--r--templates/journey.html.ep15
1 files changed, 10 insertions, 5 deletions
diff --git a/templates/journey.html.ep b/templates/journey.html.ep
index a9c0c0b..4050e61 100644
--- a/templates/journey.html.ep
+++ b/templates/journey.html.ep
@@ -78,12 +78,17 @@
<tr>
<th scope="row">Entfernung</th>
<td>
- % my $distance = get_travel_distance($journey->{from_name}, $journey->{to_name}, $journey->{route});
- % my $beeline = get_travel_distance($journey->{from_name}, $journey->{to_name}, [$journey->{from_name}, $journey->{to_name}]);
- % if ($distance > 0.1) {
- ca. <%= sprintf('%.f', $distance) %> km
+ % if ($journey->{km_route} > 0.1) {
+ ca. <%= sprintf('%.f', $journey->{km_route}) %> km
% }
- (Luftlinie: <%= sprintf('%.f', $beeline) %> km)
+ (Luftlinie: <%= sprintf('%.f', $journey->{km_beeline}) %> km)
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Geschwindigkeit</th>
+ <td>
+ ∅ <%= sprintf('%.f', $journey->{kmh_route}) %> km/h
+ (<%= sprintf('%.f', $journey->{kmh_beeline}) %> km/h)
</td>
</tr>
<tr>