2023-10-22 14:24:29 +00:00
<ul class="collection departures connections">
2019-05-19 08:32:57 +00:00
% for my $res (@{$connections}) {
2022-11-12 17:37:00 +00:00
% my ($train, $via, $via_arr, $load) = @{$res};
2022-09-24 14:11:51 +00:00
% $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{};
2023-10-22 14:24:29 +00:00
% my $row_class = '';
2019-11-25 20:18:57 +00:00
% my $link_class = 'action-checkin';
% if ($train->is_cancelled) {
2023-10-22 14:24:29 +00:00
% $row_class = 'cancelled';
2019-11-25 20:18:57 +00:00
% $link_class = 'action-cancelled-from';
% }
2022-08-17 19:45:43 +00:00
% if ($checkin_from) {
2023-10-22 14:24:29 +00:00
<li class="collection-item <%= $row_class %> <%= $link_class %>"
data-station="<%= $train->station_uic %>"
data-train="<%= $train->train_id %>"
data-ts="<%= ($train->sched_departure // $train->departure)->epoch %>"
data-dest="<%= $via->{name} %>">
2022-08-17 19:45:43 +00:00
% }
% else {
2023-10-22 14:24:29 +00:00
<li class="collection-item">
2022-08-17 19:45:43 +00:00
% }
2023-10-22 14:24:29 +00:00
<a class="dep-time" href="#">
% if ($train->departure_is_cancelled) {
%= $train->sched_departure->strftime('%H:%M')
2022-09-29 16:28:31 +00:00
% }
% else {
2023-10-22 14:24:29 +00:00
%= $train->departure->strftime('%H:%M')
% }
% if ($via_arr) {
→ <%= $via_arr %>
2022-09-24 16:57:23 +00:00
% }
2023-10-22 14:24:29 +00:00
% if ($train->departure_delay) {
%= sprintf('(%+d)', $train->departure_delay)
% }
</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">
% if ($train->is_cancelled) {
Fahrt nach <%= $via->{name} %> entfällt
2019-05-19 08:32:57 +00:00
% }
% else {
2023-09-24 16:19:17 +00:00
%= $via->{name}
2019-05-19 08:32:57 +00:00
% }
2022-09-25 15:11:54 +00:00
<br/>
2022-11-12 17:37:00 +00:00
% if ($load) {
% my ($first, $second) = load_icon($load);
<i class="material-icons tiny" aria-hidden="true"><%= $first %></i> <i class="material-icons tiny" aria-hidden="true"><%= $second %></i>
% }
2022-09-24 16:09:06 +00:00
% if ($train->{interchange_icon}) {
<i class="material-icons tiny" aria-label="<%= $train->{interchange_text} %>"><%= $train->{interchange_icon} %></i>
% }
2020-03-03 18:34:14 +00:00
% if ($train->{message_id}{96} or $train->{message_id}{97}) {
<i class="material-icons tiny" aria-label="Zug ist überbesetzt">warning</i>
% }
% if ($train->{message_id}{82} or $train->{message_id}{85}) {
2022-11-12 17:37:00 +00:00
<i class="material-icons tiny" aria-label="Fehlende Wagen">remove</i>
2020-03-03 17:29:37 +00:00
% }
% if (($train->{message_id}{73} or $train->{message_id}{74} or $train->{message_id}{75} or $train->{message_id}{76} or $train->{message_id}{80}) and not $train->{message_id}{84}) {
2020-03-03 18:34:14 +00:00
<i class="material-icons tiny" aria-label="Abweichende Wagenreihung">compare_arrows</i>
2020-03-03 17:29:37 +00:00
% }
% if ($train->{message_id}{83} or $train->{message_id}{93} or $train->{message_id}{95}) {
2020-03-03 18:34:14 +00:00
<i class="material-icons tiny" aria-label="Eingeschränkte Barrierefreiheit">info_outline</i>
2020-03-03 17:29:37 +00:00
% }
2020-03-03 18:34:14 +00:00
% if ($train->{message_id}{70} or $train->{message_id}{71}) {
<i class="material-icons tiny" aria-label="Ohne WLAN">portable_wifi_off</i>
2020-03-03 17:29:37 +00:00
% }
2023-10-22 14:24:29 +00:00
</span>
</li>
2019-05-19 08:32:57 +00:00
% }
2023-10-22 14:24:29 +00:00
</ul>