handle force checkout in history view
This commit is contained in:
parent
8e817e5d60
commit
f791a1ee6c
2 changed files with 12 additions and 5 deletions
|
@ -22,10 +22,15 @@
|
||||||
(+<%= ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60 %>)
|
(+<%= ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60 %>)
|
||||||
% }
|
% }
|
||||||
</td>
|
</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}) {
|
% if ($travel->{sched_arrival} != $travel->{rt_arrival}) {
|
||||||
(+<%= ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60 %>)
|
(+<%= ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60 %>)
|
||||||
% }
|
% }
|
||||||
|
% }
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
% }
|
% }
|
||||||
|
|
|
@ -52,11 +52,13 @@
|
||||||
<td><%= $travel->{sched_departure}->strftime('%d.%m.%Y') %></td>
|
<td><%= $travel->{sched_departure}->strftime('%d.%m.%Y') %></td>
|
||||||
<td><%= $travel->{type} %> <%= $travel->{line} // $travel->{no} %></td>
|
<td><%= $travel->{type} %> <%= $travel->{line} // $travel->{no} %></td>
|
||||||
<td><%= $travel->{from_name} %> → <%= $travel->{to_name} %></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><%= ($travel->{rt_arrival}->epoch - $travel->{rt_departure}->epoch) / 60 %> min
|
||||||
</td>
|
</td>
|
||||||
% } else {
|
% } 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>
|
</tr>
|
||||||
% }
|
% }
|
||||||
|
|
Loading…
Reference in a new issue