2019-04-23 20:27:13 +00:00
|
|
|
<div class="card green darken-4 autorefresh">
|
|
|
|
<div class="card-content white-text">
|
|
|
|
<span class="card-title">Eingecheckt</span>
|
|
|
|
<p>
|
2019-04-24 07:00:30 +00:00
|
|
|
In <b><%= $journey->{train_type} %> <%= $journey->{train_no} %></b>
|
|
|
|
% if ($journey->{arr_name}) {
|
|
|
|
von <b><%= $journey->{dep_name} %></b> nach <b><%= $journey->{arr_name} %></b>.
|
2019-04-23 20:27:13 +00:00
|
|
|
% }
|
|
|
|
% else {
|
2019-04-24 07:00:30 +00:00
|
|
|
ab <b><%= $journey->{dep_name} %></b>.
|
2019-04-23 20:27:13 +00:00
|
|
|
% }
|
|
|
|
</p>
|
|
|
|
<p>
|
2019-04-24 07:00:30 +00:00
|
|
|
<b><%= $journey->{real_departure}->strftime('%H:%M') %></b>
|
|
|
|
% if ($journey->{real_departure}->epoch != $journey->{sched_departure}->epoch) {
|
|
|
|
(<%= sprintf('%+d', ($journey->{real_departure}->epoch - $journey->{sched_departure}->epoch)/60) %>)
|
2019-04-23 20:27:13 +00:00
|
|
|
% }
|
|
|
|
→
|
2019-04-24 07:00:30 +00:00
|
|
|
% if ($journey->{real_arrival}->epoch) {
|
|
|
|
<b><%= $journey->{real_arrival}->strftime('%H:%M') %></b>
|
|
|
|
% if ($journey->{real_arrival}->epoch != $journey->{sched_arrival}->epoch) {
|
|
|
|
(<%= sprintf('%+d', ($journey->{real_arrival}->epoch - $journey->{sched_arrival}->epoch)/60) %>)
|
2019-04-23 20:27:13 +00:00
|
|
|
% }
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
unbekannt
|
|
|
|
% }
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<div class="center">
|
2019-04-24 07:00:30 +00:00
|
|
|
% if ($journey->{departure_countdown} > 120) {
|
|
|
|
Abfahrt in <%= sprintf('%.f', $journey->{departure_countdown} / 60) %> Minuten
|
2019-04-23 20:27:13 +00:00
|
|
|
% }
|
2019-04-24 07:00:30 +00:00
|
|
|
% 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' %>
|
2019-04-24 05:50:31 +00:00
|
|
|
% }
|
2019-04-24 07:00:30 +00:00
|
|
|
% elsif ($journey->{arrival_countdown} > 0) {
|
2019-04-24 05:50:31 +00:00
|
|
|
Ankunft in weniger als einer Minute
|
2019-04-23 20:27:13 +00:00
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
Ziel erreicht
|
|
|
|
% }
|
|
|
|
% }
|
2019-04-24 07:00:30 +00:00
|
|
|
% elsif ($journey->{arr_name}) {
|
2019-04-23 20:27:13 +00:00
|
|
|
Ankunft in mehr als zwei Stunden
|
|
|
|
% }
|
|
|
|
</div>
|
|
|
|
<div class="progress green darken-3" style="height: 1ex;">
|
2019-04-24 07:00:30 +00:00
|
|
|
<div class="determinate white" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
|
2019-04-23 20:27:13 +00:00
|
|
|
</div>
|
|
|
|
</p>
|
2019-04-24 07:00:30 +00:00
|
|
|
% if (defined $journey->{arrival_countdown} and $journey->{arrival_countdown} <= 0) {
|
2019-04-24 05:50:31 +00:00
|
|
|
<p>
|
|
|
|
Der automatische Checkout erfolgt in wenigen Minuten. Zum Umsteigen:
|
|
|
|
Aktuelle Station in der Liste auswählen. Zum Weiterfahren: Neues
|
|
|
|
Ziel wählen.
|
|
|
|
</p>
|
|
|
|
% }
|
2019-04-24 07:00:30 +00:00
|
|
|
% if ($journey->{arr_name}) {
|
2019-04-24 05:50:31 +00:00
|
|
|
<p>Ziel ändern?</p>
|
2019-04-23 20:27:13 +00:00
|
|
|
% }
|
|
|
|
% else {
|
2019-04-24 05:50:31 +00:00
|
|
|
<p>Ziel wählen:</p>
|
2019-04-23 20:27:13 +00:00
|
|
|
% }
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
% my $is_after = 0;
|
2019-04-24 07:00:30 +00:00
|
|
|
% for my $station (@{$journey->{route_after}}) {
|
|
|
|
% if ($journey->{arr_name} and $station eq $journey->{arr_name}) {
|
2019-04-23 20:27:13 +00:00
|
|
|
<tr><td><b><a class="action-checkout" data-station="<%= $station %>"><%= $station %></a></b></td></tr>
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
<tr><td><a class="action-checkout" data-station="<%= $station %>"><%= $station %></a></td></tr>
|
|
|
|
% }
|
|
|
|
% }
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2019-04-24 07:00:30 +00:00
|
|
|
% if ($journey->{arr_name}) {
|
2019-04-23 20:27:13 +00:00
|
|
|
<p>
|
|
|
|
Falls das Backend ausgefallen ist oder der Zug aus anderen
|
|
|
|
Gründen verloren ging: <a class="action-checkout"
|
2019-04-24 07:00:30 +00:00
|
|
|
data-force="1" data-station="<%= $journey->{arr_name}
|
|
|
|
%>">Ohne Echtzeitdaten in <%= $journey->{arr_name} %>
|
2019-04-23 20:27:13 +00:00
|
|
|
auschecken</a>.
|
|
|
|
</p>
|
|
|
|
% }
|
|
|
|
</div>
|
|
|
|
<div class="card-action">
|
|
|
|
<a class="action-undo" data-id="in_transit">
|
|
|
|
<i class="material-icons">undo</i> Checkin Rückgängig?
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|