summaryrefslogtreecommitdiff
path: root/templates/_checked_in.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-10-29 21:18:46 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-10-29 21:18:46 +0100
commit663b4dc6d89d21caa6b670d69780754b40910d90 (patch)
tree17571683194e5c26a036c69e0f2130280ec31457 /templates/_checked_in.html.ep
parentf13b4755c7db9df079c6fdb0d22679358a9585b9 (diff)
live update of next station via javascript
Diffstat (limited to 'templates/_checked_in.html.ep')
-rw-r--r--templates/_checked_in.html.ep10
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index 87b94f6..8d59c82 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -5,8 +5,10 @@
<span class="card-title">Eingecheckt in <%= $journey->{train_type} %> <%= $journey->{train_no} %></span>
<p>
<div class="center-align countdown"
- data-duration="<%= $journey->{journey_duration} // 0 %>"
- data-arrival="<%= $journey->{real_arrival}->epoch %>">
+ data-journey="<%= $journey->{real_departure}->epoch %>;<%= <%= $journey->{real_arrival}->epoch %>"
+ 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/>
% }
@@ -108,7 +110,7 @@
noch nicht bekannt
% }
</div>
- <div class="center-align hide-on-small-only">
+ <div class="center-align hide-on-small-only next-stop">
% for my $station (@{$journey->{route_after}}) {
% if ($station->[0] eq $journey->{arr_name}) {
% last;
@@ -133,7 +135,7 @@
</div>
<div style="clear: both;">
</div>
- <div class="hide-on-med-and-up" style="margin-top: 2ex;">
+ <div class="hide-on-med-and-up next-stop" style="margin-top: 2ex;">
% for my $station (@{$journey->{route_after}}) {
% if ($station->[0] eq $journey->{arr_name}) {
% last;