blob: cd9edc3f45cca29913bb38c3955ed181a6dda20d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
<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="<%= $checkin_from %>" 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="<%= $checkin_from %>" 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="<%= $checkin_from %>" 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="<%= $checkin_from %>" 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>
|