2023-06-04 16:21:36 +00:00
|
|
|
<div class="autorefresh" data-from-profile="<%= stash('from_profile') ? 1 : 0 %>">
|
2019-04-30 21:23:49 +00:00
|
|
|
% if ($journey->{checked_in}) {
|
2019-12-20 13:51:50 +00:00
|
|
|
<div class="card">
|
2019-05-02 08:05:15 +00:00
|
|
|
<div class="card-content">
|
|
|
|
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
|
2023-06-04 16:21:36 +00:00
|
|
|
<span class="card-title">
|
|
|
|
% if (stash('from_profile')) {
|
|
|
|
Unterwegs mit <%= include '_format_train', journey => $journey %>
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
<a href="/p/<%= $name %>"><%= $name %></a> ist unterwegs
|
|
|
|
% }
|
2023-06-29 19:54:25 +00:00
|
|
|
<i class="material-icons right"><%= visibility_icon($journey->{effective_visibility_str}) %></i>
|
2023-02-27 21:14:54 +00:00
|
|
|
</span>
|
2023-06-23 20:43:41 +00:00
|
|
|
% if ($privacy->{comments_visible} and $journey->{comment}) {
|
2019-12-06 20:42:26 +00:00
|
|
|
<p>„<%= $journey->{comment} %>“</p>
|
|
|
|
% }
|
2019-04-30 21:23:49 +00:00
|
|
|
<p>
|
2023-06-04 16:21:36 +00:00
|
|
|
% if (not stash('from_profile')) {
|
|
|
|
<div class="center-align">
|
|
|
|
%= include '_format_train', journey => $journey
|
|
|
|
</div>
|
|
|
|
% }
|
2019-05-10 15:58:13 +00:00
|
|
|
<div class="center-align countdown"
|
|
|
|
data-duration="<%= $journey->{journey_duration} // 0 %>"
|
2023-02-27 21:14:54 +00:00
|
|
|
% if (param('token')) {
|
2023-03-04 09:25:16 +00:00
|
|
|
data-token="<%= $journey->{dep_eva} %>-<%= $journey->{timestamp}->epoch % 337 %>-<%= $journey->{sched_departure}->epoch %>"
|
2023-02-27 21:14:54 +00:00
|
|
|
% }
|
2019-05-10 15:58:13 +00:00
|
|
|
data-arrival="<%= $journey->{real_arrival}->epoch %>">
|
2023-07-07 20:25:54 +00:00
|
|
|
% if ($journey->{departure_countdown} > 60) {
|
|
|
|
Abfahrt in <%= journeys->min_to_human(int($journey->{departure_countdown} / 60)) %>
|
2019-04-30 21:23:49 +00:00
|
|
|
% }
|
|
|
|
% elsif ($journey->{departure_countdown} > 0) {
|
|
|
|
Abfahrt in weniger als einer Minute
|
|
|
|
% }
|
|
|
|
% elsif (defined $journey->{arrival_countdown}) {
|
|
|
|
% if ($journey->{arrival_countdown} > 60) {
|
2023-07-07 20:25:54 +00:00
|
|
|
Ankunft in <%= journeys->min_to_human(int($journey->{arrival_countdown} / 60)) %>
|
2019-04-30 21:23:49 +00:00
|
|
|
% }
|
|
|
|
% elsif ($journey->{arrival_countdown} > 0) {
|
|
|
|
Ankunft in weniger als einer Minute
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
Ziel erreicht
|
|
|
|
% }
|
2019-05-25 21:04:36 +00:00
|
|
|
% if ($journey->{arrival_countdown} < (60 * 15) and $journey->{arr_platform}) {
|
2019-05-18 15:10:53 +00:00
|
|
|
<br/>auf Gleis <%= $journey->{arr_platform} %>
|
|
|
|
% }
|
2019-04-30 21:23:49 +00:00
|
|
|
% }
|
|
|
|
% elsif ($journey->{arr_name}) {
|
|
|
|
Ankunft in mehr als zwei Stunden
|
|
|
|
% }
|
|
|
|
</div>
|
2019-05-18 08:16:49 +00:00
|
|
|
<div class="progress" style="height: 1ex;">
|
|
|
|
<div class="determinate" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
|
2019-05-02 08:05:15 +00:00
|
|
|
</div>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<div style="float: left;">
|
|
|
|
<b><%= $journey->{dep_name} %></b><br/>
|
|
|
|
<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) %>)
|
|
|
|
% }
|
|
|
|
</div>
|
2019-05-03 08:49:14 +00:00
|
|
|
<div style="float: right; text-align: right;">
|
2019-05-02 08:05:15 +00:00
|
|
|
% if ($journey->{arr_name}) {
|
|
|
|
<b><%= $journey->{arr_name} %></b><br/>
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
Fahrt ins Blaue<br/>
|
|
|
|
% }
|
|
|
|
% 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) %>)
|
|
|
|
% }
|
|
|
|
% }
|
|
|
|
% elsif ($journey->{arr_name}) {
|
|
|
|
noch nicht bekannt
|
|
|
|
% }
|
|
|
|
</div>
|
2019-05-31 18:18:22 +00:00
|
|
|
<div class="center-align hide-on-small-only">
|
|
|
|
% for my $station (@{$journey->{route_after}}) {
|
2019-11-26 17:35:51 +00:00
|
|
|
% if ($journey->{arr_name} and $station->[0] eq $journey->{arr_name}) {
|
2019-05-31 18:18:22 +00:00
|
|
|
% last;
|
|
|
|
% }
|
2023-01-15 15:37:32 +00:00
|
|
|
% if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) {
|
|
|
|
<%= $station->[0] %><br/><%= $station->[2]{rt_arr}->strftime('%H:%M') %>
|
|
|
|
% if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) {
|
|
|
|
%= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60);
|
2019-05-31 18:18:22 +00:00
|
|
|
% }
|
|
|
|
% last;
|
|
|
|
% }
|
2023-01-15 15:37:32 +00:00
|
|
|
% if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) {
|
2019-05-31 18:18:22 +00:00
|
|
|
<%= $station->[0] %><br/>
|
2023-01-15 15:37:32 +00:00
|
|
|
<%= $station->[2]{rt_arr}->strftime('%H:%M') %> →
|
|
|
|
<%= $station->[2]{rt_dep}->strftime('%H:%M') %>
|
|
|
|
% if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) {
|
|
|
|
%= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60);
|
2019-05-31 18:18:22 +00:00
|
|
|
% }
|
|
|
|
% last;
|
|
|
|
% }
|
|
|
|
% }
|
|
|
|
</div>
|
2019-05-02 08:05:15 +00:00
|
|
|
<div style="clear: both;">
|
2019-04-30 21:23:49 +00:00
|
|
|
</div>
|
2019-05-31 18:18:22 +00:00
|
|
|
<div class="hide-on-med-and-up" style="margin-top: 2ex;">
|
|
|
|
% for my $station (@{$journey->{route_after}}) {
|
2019-11-26 17:35:51 +00:00
|
|
|
% if ($journey->{arr_name} and $station->[0] eq $journey->{arr_name}) {
|
2019-05-31 18:18:22 +00:00
|
|
|
% last;
|
|
|
|
% }
|
2023-01-15 15:37:32 +00:00
|
|
|
% if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) {
|
2019-05-31 18:18:22 +00:00
|
|
|
Nächster Halt:<br/>
|
2023-01-15 15:37:32 +00:00
|
|
|
<%= $station->[0] %><br/><%= $station->[2]{rt_arr}->strftime('%H:%M') %>
|
|
|
|
% if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) {
|
|
|
|
%= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60);
|
2019-05-31 18:18:22 +00:00
|
|
|
% }
|
|
|
|
% last;
|
|
|
|
% }
|
2023-01-15 15:37:32 +00:00
|
|
|
% if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) {
|
2019-05-31 18:18:22 +00:00
|
|
|
Aktueller Halt:<br/>
|
|
|
|
<%= $station->[0] %><br/>
|
2023-01-15 15:37:32 +00:00
|
|
|
<%= $station->[2]{rt_arr}->strftime('%H:%M') %> →
|
|
|
|
<%= $station->[2]{rt_dep}->strftime('%H:%M') %>
|
|
|
|
% if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) {
|
|
|
|
%= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60);
|
2019-05-31 18:18:22 +00:00
|
|
|
% }
|
|
|
|
% last;
|
|
|
|
% }
|
|
|
|
% }
|
|
|
|
</div>
|
2019-04-30 21:23:49 +00:00
|
|
|
</p>
|
2020-02-13 17:35:42 +00:00
|
|
|
% if ($journey->{extra_data}{cancelled_destination}) {
|
|
|
|
<p style="margin-bottom: 2ex;">
|
|
|
|
<i class="material-icons tiny" aria-hidden="true">error</i>
|
|
|
|
Der Halt an der Zielstation <b><%=
|
|
|
|
$journey->{extra_data}{cancelled_destination} %></b> entfällt.
|
|
|
|
</p>
|
|
|
|
% }
|
2019-04-30 21:23:49 +00:00
|
|
|
% if (@{$journey->{messages} // []} > 0 and $journey->{messages}[0]) {
|
|
|
|
<p style="margin-bottom: 2ex;">
|
|
|
|
<ul>
|
|
|
|
% for my $message (reverse @{$journey->{messages} // []}) {
|
|
|
|
% if ($journey->{sched_departure}->epoch - $message->[0]->epoch < 1800) {
|
|
|
|
<li> <i class="material-icons tiny">warning</i> <%= $message->[0]->strftime('%H:%M') %>: <%= $message->[1] %></li>
|
|
|
|
% }
|
|
|
|
% }
|
2019-12-31 12:04:03 +00:00
|
|
|
% for my $message (@{$journey->{extra_data}{qos_msg} // []}) {
|
|
|
|
<li> <i class="material-icons tiny">info</i> <%= $message->[0]->strftime('%H:%M') %>: <%= $message->[1] %></li>
|
|
|
|
% }
|
2019-04-30 21:23:49 +00:00
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
% }
|
|
|
|
</div>
|
2020-01-08 18:12:03 +00:00
|
|
|
<div class="card-action">
|
2022-02-16 19:56:28 +00:00
|
|
|
% if ($journey->{traewelling_url}) {
|
|
|
|
<a style="margin-right: 0;" href="<%= $journey->{traewelling_url} %>"><i class="material-icons left">timeline</i> Träwelling</a>
|
|
|
|
% } else {
|
2022-08-19 15:21:41 +00:00
|
|
|
% my $url = 'https://bahn.expert/details/' . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . DateTime->now(time_zone => 'Europe/Berlin')->epoch . '000';
|
2022-02-16 19:56:28 +00:00
|
|
|
<a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left">timeline</i> Zuglauf</a>
|
|
|
|
% }
|
2020-01-08 18:01:19 +00:00
|
|
|
% if ($journey->{extra_data}{trip_id}) {
|
2020-01-08 20:31:28 +00:00
|
|
|
<a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} %>/<%= $journey->{train_line} || 0 %>?from=<%= $journey->{dep_name} %>&to=<%= $journey->{arr_name} // '' %>"><i class="material-icons left">map</i> Karte</a>
|
2020-01-08 18:01:19 +00:00
|
|
|
% }
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-04-30 21:23:49 +00:00
|
|
|
% }
|
|
|
|
% else {
|
2019-12-20 13:51:50 +00:00
|
|
|
<div class="card">
|
2019-05-16 14:10:53 +00:00
|
|
|
<div class="card-content">
|
2019-05-02 08:05:15 +00:00
|
|
|
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
|
2023-06-04 16:21:36 +00:00
|
|
|
% if (stash('from_profile')) {
|
|
|
|
<span class="card-title">Aktuell nicht eingecheckt</span>
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
<span class="card-title"><a href="/p/<%= $name %>"><%= $name %></a> ist gerade nicht eingecheckt</span>
|
|
|
|
% }
|
2019-04-30 21:23:49 +00:00
|
|
|
<p>
|
2023-03-04 08:03:50 +00:00
|
|
|
% if ($journey->{arr_name}) {
|
|
|
|
Zuletzt gesehen
|
2023-06-23 19:04:25 +00:00
|
|
|
% if ($journey->{real_arrival}->epoch) {
|
2023-03-04 08:03:50 +00:00
|
|
|
%= $journey->{real_arrival}->strftime('am %d.%m.%Y')
|
|
|
|
in <b><%= $journey->{arr_name} %></b>
|
|
|
|
%= $journey->{real_arrival}->strftime('(Ankunft um %H:%M Uhr)')
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
in <b><%= $journey->{arr_name} %></b>
|
|
|
|
% }
|
|
|
|
% }
|
2019-04-30 21:23:49 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
% }
|
2019-12-20 13:51:50 +00:00
|
|
|
</div>
|