diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-10-05 20:41:28 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-10-05 20:41:28 +0200 |
commit | 7694e626a51439a7a0902c686bf9048bcdaf4b3f (patch) | |
tree | 96224dc5e9b42b4d24b134f98ffa7078575fc8f6 /templates/landingpage.html.ep | |
parent | 6afef992f1840d29a4277f6063bdcd5c2e13ed89 (diff) |
show journey distances as well
Diffstat (limited to 'templates/landingpage.html.ep')
-rw-r--r-- | templates/landingpage.html.ep | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index a33d83a..9e45076 100644 --- a/templates/landingpage.html.ep +++ b/templates/landingpage.html.ep @@ -49,10 +49,12 @@ <td><%= $travel->{type} %> <%= $travel->{line} // $travel->{no} %></td> <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</td> - % } - % else { - <td>?</td> + <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> % } </tr> % } |