journey: show distance
This commit is contained in:
parent
ef8b688eb1
commit
2366b193fe
1 changed files with 12 additions and 1 deletions
|
@ -32,7 +32,7 @@
|
|||
<td>
|
||||
<%= $journey->{type} %> <%= $journey->{no} %>
|
||||
% if ($journey->{line}) {
|
||||
(Linie <%= $journey->{type} %> <%= $journey->{line} %>)
|
||||
(Linie <%= $journey->{line} %>)
|
||||
% }
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -75,6 +75,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>
|
||||
|
|
Loading…
Reference in a new issue