summaryrefslogtreecommitdiff
path: root/templates/history.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-10-18 16:26:02 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-10-18 16:26:02 +0200
commit046ab99013958d9016e6e2cbff1a6c2557576315 (patch)
tree91956da4a59e13bc89087f04c96b19d00c7e72bf /templates/history.html.ep
parentd7fc6ceb3a95f2dadd899c4e9b221a8a11327fc1 (diff)
history: show departure and arrival times
Diffstat (limited to 'templates/history.html.ep')
-rw-r--r--templates/history.html.ep15
1 files changed, 10 insertions, 5 deletions
diff --git a/templates/history.html.ep b/templates/history.html.ep
index 3c798a4..02d82ab 100644
--- a/templates/history.html.ep
+++ b/templates/history.html.ep
@@ -6,7 +6,8 @@
<th>Datum</th>
<th>Zug</th>
<th>Strecke</th>
- <th>Dauer</th>
+ <th>Abfahrt</th>
+ <th>Ankunft</th>
</tr>
</thead>
<tbody>
@@ -16,12 +17,16 @@
<td><%= $travel->{sched_departure}->strftime('%d.%m.%Y') %></td>
<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>
+ <td><%= $travel->{rt_departure}->strftime('%H:%M') %>
+ % if ($travel->{sched_departure} != $travel->{rt_departure}) {
+ (+<%= ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60 %>)
% }
- % else {
- <td>?</td>
+ </td>
+ <td><%= $travel->{rt_arrival}->strftime('%H:%M') %>
+ % if ($travel->{sched_arrival} != $travel->{rt_arrival}) {
+ (+<%= ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60 %>)
% }
+ </td>
</tr>
% }
% }