summaryrefslogtreecommitdiff
path: root/templates/_connections_iris.html.ep
blob: 8ddc63482c56e405568f27a0f32f2177fcb0cfcb (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
<ul class="collection departures connections">
	% for my $res (@{$suggestions}) {
		% my ($train, $dest) = @{$res};
		% my $row_class = '';
		% my $link_class = 'action-checkin';
		% if ($train->{departure_is_cancelled}) {
			% $row_class = 'cancelled';
			% $link_class = 'action-cancelled-from';
		% }
		% if ($checkin_from) {
			<li class="collection-item <%= $row_class %> <%= $link_class %>"
			data-station="<%= $train->{station_uic} %>"
			data-train="<%= $train->{id} %>"
			data-ts="<%= $train->{ts} %>"
			data-dest="<%= $dest->{name} %>">
		% }
		% else {
			<li class="collection-item <%= $row_class %>">
		% }
			<a class="dep-time" href="#">
				% if ($train->{departure_is_cancelled}) {
					%= $train->{sched_hhmm}
				% }
				% else {
					%= $train->{rt_hhmm}
				% }
				% if ($train->{departure_delay}) {
					%= sprintf('(%+d)', $train->{departure_delay})
				% }
			</a>
			<span class="connect-platform-wrapper">
				% if ($train->{platform}) {
					<span>Gleis <%= $train->{platform} %></span>
				% }
				<span class="dep-line <%= $train->{type} // q{} %>">
					%= $train->{line}
				</span>
			</span>
			<span class="dep-dest">
				%= $dest->{name}
			</span>
		</li>
	% }
</ul>