Commit 2366b193 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

journey: show distance

parent ef8b688e
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -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>