2023-09-24 16:19:17 +00:00
|
|
|
<div><table class="striped"><tbody>
|
|
|
|
% for my $res (@{$connections}) {
|
|
|
|
% my ($train, $via, $via_arr) = @{$res};
|
|
|
|
% $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{};
|
|
|
|
% my $td_class = '';
|
|
|
|
% my $link_class = 'action-checkin';
|
|
|
|
% if ($train->is_cancelled) {
|
|
|
|
% $td_class = 'cancelled';
|
|
|
|
% $link_class = 'action-cancelled-from';
|
|
|
|
% }
|
|
|
|
% if ($checkin_from) {
|
2023-10-20 16:04:32 +00:00
|
|
|
<tr 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 {
|
|
|
|
<tr>
|
|
|
|
% }
|
|
|
|
<td class="<%= $td_class %>">
|
|
|
|
% if ($train->platform) {
|
|
|
|
% if ($checkin_from) {
|
|
|
|
<a>Gleis <%= $train->platform %></a>
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
Gleis <%= $train->platform %>
|
|
|
|
% }
|
|
|
|
<br/>
|
|
|
|
% }
|
|
|
|
% if ($checkin_from) {
|
|
|
|
<a><%= $train->line %></a>
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
%= $train->line
|
|
|
|
% }
|
|
|
|
</td>
|
|
|
|
<td class="<%= $td_class %>">
|
|
|
|
% if ($checkin_from) {
|
|
|
|
<a><%= $via->{name} %></a>
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
%= $via->{name}
|
|
|
|
% }
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
% 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)
|
|
|
|
% }
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
% }
|
|
|
|
</tbody></table></div>
|