mirror of
https://github.com/derf/travelynx
synced 2024-12-04 10:19:09 +00:00
47f76da4f8
Squashed commit of the following: commit92518024ba
Author: Birte Kristina Friesel <birte.friesel@uos.de> Date: Fri Jul 26 18:39:46 2024 +0200 add_or_update station: remove superfluos 'new backend id := old backend id' commitdf21c20c6e
Author: Birte Kristina Friesel <birte.friesel@uos.de> Date: Fri Jul 26 18:35:51 2024 +0200 revert connection targets min_count to 3 commitbe335cef07
Author: Birte Kristina Friesel <birte.friesel@uos.de> Date: Fri Jul 26 18:20:05 2024 +0200 mention backend selection in API documentation commit9f41828fb4
Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Thu Jul 25 20:19:23 2024 +0200 use_history: not all backends provide route data in departure monitor commit09714b4d89
Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Thu Jul 25 20:11:44 2024 +0200 disambiguation: pass correct hafas parameter commit8cdf1120fc
Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Thu Jul 25 20:11:28 2024 +0200 _checked_in: hide Zuglauf link for non-db checkins commit7455653f54
Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Thu Jul 25 20:01:47 2024 +0200 debug output commitb9cda07f85
Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Thu Jul 25 19:09:07 2024 +0200 fix remaining get_connection_targets / get_connecting_trains_p invocations commit2759d7258c
Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Wed Jul 24 20:50:12 2024 +0200 support non-DB HAFAS backends (WiP)
54 lines
1.7 KiB
Text
54 lines
1.7 KiB
Text
<ul class="collection departures">
|
|
% my $orientation_bar_shown = param('train');
|
|
% my $now_epoch = now->epoch;
|
|
% for my $result (@{$results}) {
|
|
% my $row_class = '';
|
|
% my $link_class = 'action-checkin';
|
|
% if ($result->is_cancelled) {
|
|
% $row_class = "cancelled";
|
|
% $link_class = 'action-cancelled-from';
|
|
% }
|
|
% if (not $orientation_bar_shown and $result->datetime->epoch < $now_epoch) {
|
|
% $orientation_bar_shown = 1;
|
|
<li class="collection-item" id="now">
|
|
<strong class="dep-time">
|
|
%= now->strftime('%H:%M')
|
|
</strong>
|
|
<strong>— Anfragezeitpunkt —</strong>
|
|
</li>
|
|
% }
|
|
<li class="collection-item <%= $link_class %> <%= $row_class %>"
|
|
data-hafas="<%= $hafas %>"
|
|
data-station="<%= $result->station_eva %>"
|
|
data-train="<%= $result->id %>"
|
|
data-ts="<%= ($result->sched_datetime // $result->datetime)->epoch %>"
|
|
>
|
|
<a class="dep-time" href="#">
|
|
%= $result->datetime->strftime('%H:%M')
|
|
% if ($result->delay) {
|
|
(<%= sprintf('%+d', $result->delay) %>)
|
|
% }
|
|
% elsif (not defined $result->delay and not $result->is_cancelled) {
|
|
<i class="material-icons" aria-label="Keine Echtzeitdaten vorhanden" style="font-size: 16px;">gps_off</i>
|
|
% }
|
|
</a>
|
|
<span class="dep-line <%= $result->type // q{} %>">
|
|
%= $result->line
|
|
</span>
|
|
<span class="dep-dest">
|
|
% if ($result->is_cancelled) {
|
|
Fahrt nach <%= $result->destination %> entfällt
|
|
% }
|
|
% else {
|
|
%= $result->destination
|
|
% for my $checkin (@{$checkin_by_train->{$result->id} // []}) {
|
|
<span class="followee-checkin">
|
|
<i class="material-icons tiny" aria-label="Eine Person, der du folgst, ist hier eingecheckt">people</i>
|
|
<%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %>
|
|
</span>
|
|
% }
|
|
% }
|
|
</span>
|
|
</li>
|
|
% }
|
|
</ul>
|