From 84afb1bc2c624ac4e7e6047a8d628e10944a70fb Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 18 Jul 2021 20:43:55 +0200 Subject: [PATCH] departures: show annotation if no realtime data is available --- cpanfile | 2 +- templates/departures.html.ep | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cpanfile b/cpanfile index 3a70126..0320f88 100644 --- a/cpanfile +++ b/cpanfile @@ -13,7 +13,7 @@ requires 'Mojolicious::Plugin::Authentication'; requires 'Mojo::Pg'; requires 'Text::CSV'; requires 'Travel::Status::DE::DBWagenreihung'; -requires 'Travel::Status::DE::IRIS'; +requires 'Travel::Status::DE::IRIS', '1.57'; requires 'UUID::Tiny'; requires 'JSON'; requires 'JSON::XS'; diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 706a441..91b3331 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -101,6 +101,9 @@ % if ($result->departure_delay) { (<%= sprintf('%+d', $result->departure_delay) %>) % } + % elsif (not $result->has_realtime and $result->start->epoch < $now_epoch) { + gps_off + % } % }