2023-10-22 14:24:29 +00:00
|
|
|
<ul class="collection departures connections">
|
2023-09-24 16:19:17 +00:00
|
|
|
% for my $res (@{$connections}) {
|
|
|
|
% my ($train, $via, $via_arr) = @{$res};
|
|
|
|
% $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{};
|
2023-10-22 14:24:29 +00:00
|
|
|
% my $row_class = '';
|
2023-09-24 16:19:17 +00:00
|
|
|
% my $link_class = 'action-checkin';
|
|
|
|
% if ($train->is_cancelled) {
|
2023-10-22 14:24:29 +00:00
|
|
|
% $row_class = 'cancelled';
|
2023-09-24 16:19:17 +00:00
|
|
|
% $link_class = 'action-cancelled-from';
|
|
|
|
% }
|
|
|
|
% if ($checkin_from) {
|
2023-10-22 14:24:29 +00:00
|
|
|
<li class="collection-item <%= $row_class %> <%= $link_class %>"
|
|
|
|
data-station="<%= $train->station_eva %>"
|
|
|
|
data-train="<%= $train->id %>"
|
|
|
|
data-ts="<%= ($train->sched_datetime // $train->datetime)->epoch %>"
|
|
|
|
data-dest="<%= $via->{name} %>">
|
2023-09-24 16:19:17 +00:00
|
|
|
% }
|
|
|
|
% else {
|
2023-12-27 10:11:52 +00:00
|
|
|
<li class="collection-item <%= $row_class %>">
|
2023-09-24 16:19:17 +00:00
|
|
|
% }
|
2023-10-22 14:24:29 +00:00
|
|
|
<a class="dep-time" href="#">
|
2023-09-24 16:19:17 +00:00
|
|
|
% if ($train->is_cancelled) {
|
|
|
|
%= $train->sched_datetime->strftime('%H:%M')
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
%= $train->datetime->strftime('%H:%M')
|
|
|
|
% }
|
|
|
|
% if ($via_arr) {
|
|
|
|
→ <%= $via_arr %>
|
|
|
|
% }
|
|
|
|
% if ($train->delay) {
|
|
|
|
%= sprintf('(%+d)', $train->delay)
|
|
|
|
% }
|
2023-10-22 14:24:29 +00:00
|
|
|
</a>
|
|
|
|
<span class="connect-platform-wrapper">
|
|
|
|
% if ($train->platform) {
|
|
|
|
<span>Gleis <%= $train->platform %></span>
|
|
|
|
% }
|
2023-10-27 16:34:02 +00:00
|
|
|
<span class="dep-line <%= $train->type // q{} %>">
|
2023-10-22 14:24:29 +00:00
|
|
|
%= $train->line
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span class="dep-dest">
|
|
|
|
%= $via->{name}
|
|
|
|
</span>
|
|
|
|
</li>
|
2023-09-24 16:19:17 +00:00
|
|
|
% }
|
2023-10-22 14:24:29 +00:00
|
|
|
</ul>
|