summaryrefslogtreecommitdiff
path: root/templates/_checked_in.html.ep
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-07-07 22:25:12 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-07-07 22:25:12 +0200
commit053d3fd79deea86c2a0b4ec292502b012664b7fe (patch)
treed11aa31227991fdc24b434f6ed2757b8048e7f1b /templates/_checked_in.html.ep
parentc9bae6fcee739e057f95512f9a3d56afcfaf84e8 (diff)
_checked_in: also use hh:mm format for boarding and departure countdown
Diffstat (limited to 'templates/_checked_in.html.ep')
-rw-r--r--templates/_checked_in.html.ep14
1 files 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<br/>
- % }
- % elsif ($journey->{boarding_countdown} > 60) {
- Einfahrt in einer Minute<br/>
+ % if ($journey->{boarding_countdown} > 60) {
+ Einfahrt in <%= journeys->min_to_human(int($journey->{boarding_countdown} / 60)) %><br/>
% }
% elsif ($journey->{boarding_countdown} > 0) {
Zug fährt ein<br/>
% }
- % 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