diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/history.html.ep | 11 | ||||
-rw-r--r-- | templates/landingpage.html.ep | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/templates/history.html.ep b/templates/history.html.ep index 24434d0..c7e6b6f 100644 --- a/templates/history.html.ep +++ b/templates/history.html.ep @@ -22,9 +22,14 @@ (+<%= ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60 %>) % } </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> + % 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> diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index c1d62d8..5d03262 100644 --- a/templates/landingpage.html.ep +++ b/templates/landingpage.html.ep @@ -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> % } |