summaryrefslogtreecommitdiff
path: root/templates/landingpage.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-10-05 20:41:28 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-10-05 20:41:28 +0200
commit7694e626a51439a7a0902c686bf9048bcdaf4b3f (patch)
tree96224dc5e9b42b4d24b134f98ffa7078575fc8f6 /templates/landingpage.html.ep
parent6afef992f1840d29a4277f6063bdcd5c2e13ed89 (diff)
show journey distances as well
Diffstat (limited to 'templates/landingpage.html.ep')
-rw-r--r--templates/landingpage.html.ep10
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>
% }