summaryrefslogtreecommitdiff
path: root/templates/journey.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/journey.html.ep')
-rw-r--r--templates/journey.html.ep13
1 files changed, 12 insertions, 1 deletions
diff --git a/templates/journey.html.ep b/templates/journey.html.ep
index e00fdc2..a9c0c0b 100644
--- a/templates/journey.html.ep
+++ b/templates/journey.html.ep
@@ -32,7 +32,7 @@
<td>
<%= $journey->{type} %> <%= $journey->{no} %>
% if ($journey->{line}) {
- (Linie <%= $journey->{type} %> <%= $journey->{line} %>)
+ (Linie <%= $journey->{line} %>)
% }
</td>
</tr>
@@ -76,6 +76,17 @@
</td>
</tr>
<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
+ % }
+ (Luftlinie: <%= sprintf('%.f', $beeline) %> km)
+ </td>
+ </tr>
+ <tr>
<th scope="row">Meldungen</th>
<td>
% for my $message (@{$journey->{messages} // []}) {