handle force checkout in history view

This commit is contained in:
Daniel Friesel 2018-10-21 16:05:18 +02:00
parent 8e817e5d60
commit f791a1ee6c
2 changed files with 12 additions and 5 deletions

View file

@ -22,10 +22,15 @@
(+<%= ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60 %>)
% }
</td>
<td><%= $travel->{rt_arrival}->strftime('%H:%M') %>
<td>
% if ($travel->{rt_arrival}->epoch == 0 and $travel->{sched_arrival}->epoch == 0) {
<i class="material-icons">timer_off</i>
% } else {
%= $travel->{rt_arrival}->strftime('%H:%M');
% if ($travel->{sched_arrival} != $travel->{rt_arrival}) {
(+<%= ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60 %>)
% }
% }
</td>
</tr>
% }

View file

@ -52,11 +52,13 @@
<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}) {
% if ($travel->{rt_arrival}->epoch and $travel->{rt_departure}->epoch) {
<td><%= ($travel->{rt_arrival}->epoch - $travel->{rt_departure}->epoch) / 60 %> min
</td>
% } else {
<td><%= sprintf('%.f', $self->get_travel_distance($travel->{from_name}, $travel->{to_name}, $travel->{route})) %>km</td>
<td><%= sprintf('%.f', $self->get_travel_distance($travel->{from_name}, $travel->{to_name}, $travel->{route})) %>km
<i class="material-icons">timer_off</i>
</td>
% }
</tr>
% }