summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-07-07 22:25:54 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-07-07 22:25:54 +0200
commit32341dc5d261df7713a700d89d7a72dcd94fea28 (patch)
treebb2f4858791596c22c56ba29efac4d646d633ed9 /templates
parent053d3fd79deea86c2a0b4ec292502b012664b7fe (diff)
public status: use hh:mm format for countdowns
Diffstat (limited to 'templates')
-rw-r--r--templates/_public_status_card.html.ep10
1 files changed, 3 insertions, 7 deletions
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index 33635ae..acbae0d 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -27,19 +27,15 @@
data-token="<%= $journey->{dep_eva} %>-<%= $journey->{timestamp}->epoch % 337 %>-<%= $journey->{sched_departure}->epoch %>"
% }
data-arrival="<%= $journey->{real_arrival}->epoch %>">
- % 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
% }
% elsif (defined $journey->{arrival_countdown}) {
% if ($journey->{arrival_countdown} > 60) {
- Ankunft in <%= sprintf('%.f', $journey->{arrival_countdown} / 60) %>
- Minute<%= sprintf('%.f', $journey->{arrival_countdown} / 60) == 1 ? '' : 'n' %>
+ Ankunft in <%= journeys->min_to_human(int($journey->{arrival_countdown} / 60)) %>
% }
% elsif ($journey->{arrival_countdown} > 0) {
Ankunft in weniger als einer Minute