From 053d3fd79deea86c2a0b4ec292502b012664b7fe Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 7 Jul 2023 22:25:12 +0200 Subject: [PATCH] _checked_in: also use hh:mm format for boarding and departure countdown --- templates/_checked_in.html.ep | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 0deab37..bfc7cb1 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -20,20 +20,14 @@ data-route="<%= journey_to_ajax_route($journey) %>" data-dest="<%= $journey->{arr_name} %>" > - % if ($journey->{boarding_countdown} > 120) { - Einfahrt in <%= sprintf('%.f', $journey->{boarding_countdown} / 60) %> Minuten
- % } - % elsif ($journey->{boarding_countdown} > 60) { - Einfahrt in einer Minute
+ % if ($journey->{boarding_countdown} > 60) { + Einfahrt in <%= journeys->min_to_human(int($journey->{boarding_countdown} / 60)) %>
% } % elsif ($journey->{boarding_countdown} > 0) { Zug fährt ein
% } - % if ($journey->{departure_countdown} > 120) { - Abfahrt in <%= sprintf('%.f', $journey->{departure_countdown} / 60) %> Minuten - % } - % elsif ($journey->{departure_countdown} > 60) { - Abfahrt in einer Minute + % if ($journey->{departure_countdown} > 60) { + Abfahrt in <%= journeys->min_to_human(int($journey->{departure_countdown} / 60)) %> % } % elsif ($journey->{departure_countdown} > 0) { Abfahrt in weniger als einer Minute