only show travel distance if duration is not available

This commit is contained in:
Daniel Friesel 2018-10-07 09:12:45 +02:00
parent bf6f6405f1
commit d95cb9d06a

View file

@ -50,8 +50,6 @@
<td><%= $travel->{from_name} %> → <%= $travel->{to_name} %></td>
% if ($travel->{rt_arrival} and $travel->{rt_departure}) {
<td><%= ($travel->{rt_arrival}->epoch - $travel->{rt_departure}->epoch) / 60 %> min
/
<%= sprintf('%.f', $self->get_travel_distance($travel->{from_name}, $travel->{to_name}, $travel->{route})) %>km
</td>
% } else {
<td><%= sprintf('%.f', $self->get_travel_distance($travel->{from_name}, $travel->{to_name}, $travel->{route})) %>km</td>