mirror of
https://github.com/derf/travelynx
synced 2024-12-02 17:29:11 +00:00
b12b5a821b
Not well-tested yet, deployment will have to wait a bit. Issue #15
62 lines
1.9 KiB
Text
62 lines
1.9 KiB
Text
<div class="hide-on-med-and-up"><table class="striped"><tbody>
|
|
% for my $res (@{$connections}) {
|
|
% my ($train, $via) = @{$res};
|
|
<tr>
|
|
<td>
|
|
% if ($checkin_from) {
|
|
<a class="action-checkin" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $train->line %></a>
|
|
% }
|
|
% else {
|
|
%= $train->line
|
|
% }
|
|
</td>
|
|
<td>
|
|
% if ($checkin_from) {
|
|
<a class="action-checkin" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $via %></a>
|
|
% }
|
|
% else {
|
|
%= $via
|
|
% }
|
|
</td>
|
|
<td><%= $train->departure->strftime('%H:%M') %>
|
|
% if ($train->departure_delay) {
|
|
%= sprintf('(%+d)', $train->departure_delay)
|
|
% }
|
|
<br/>Gleis <%= $train->platform || '?' %></td>
|
|
</tr>
|
|
% }
|
|
</tbody></table></div>
|
|
<div class="hide-on-small-only"><table class="striped"><tbody>
|
|
% for my $res (@{$connections}) {
|
|
% my ($train, $via) = @{$res};
|
|
% my $td_class = '';
|
|
% my $link_class = 'action-checkin';
|
|
% if ($train->departure_is_cancelled) {
|
|
% $td_class = 'cancelled';
|
|
% $link_class = 'action-cancelled-from';
|
|
% }
|
|
<tr>
|
|
<td class="<%= $td_class %>">
|
|
% if ($checkin_from) {
|
|
<a class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $train->line %></a>
|
|
% }
|
|
% else {
|
|
%= $train->line
|
|
% }
|
|
</td>
|
|
<td class="<%= $td_class %>">
|
|
% if ($checkin_from) {
|
|
<a class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $via %></a>
|
|
% }
|
|
% else {
|
|
%= $via
|
|
% }
|
|
</td>
|
|
<td><%= $train->departure->strftime('%H:%M') %>
|
|
% if ($train->departure_delay) {
|
|
%= sprintf('(%+d)', $train->departure_delay)
|
|
% }
|
|
</td><td>Gleis <%= $train->platform || '?' %></td>
|
|
</tr>
|
|
% }
|
|
</tbody></table></div>
|