summaryrefslogtreecommitdiff
path: root/templates/checkin.html.ep
blob: 7e68a0bf515df62c2052ed00a56d1d4e59eb83a8 (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
% if ($error) {
	<div class="row">
		<div class="col s12 m6">
			<div class="card red darken-4">
				<div class="card-content white-text">
					<span class="card-title">I am Error</span>
					<p><%= $error %></p>
				</div>
				<div class="card-action">
					% if (param('station')) {
						<a href="/<%= param('station') %>">Zurück zu den Abfahrten</a>
					% }
					% else {
						<a href="/">Zur Hauptseite</a>
					% }
			</div>
		</div>
	</div>
% }
% else {
	<div class="row">
		<div class="col s12">
			<div class="card green darken-4">
				<div class="card-content white-text">
					<span class="card-title">Eingecheckt in <%= $train->line %></span>
					<p>Abfahrt um <%= $train->sched_departure->strftime('%H:%M') %>
						% if ($train->departure_delay) {
							+<%= $train->departure_delay %>
						% }
					</p>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col s12">
			Weitere Route:
		</div>
	</div>
	<div class="row">
		<div class="col s12">
			<table>
				<tbody>
					% for my $station ($train->route_post) {
						<tr>
							<td><%= $station %></td>
							<td><a href="/a/checkout?station=<%= $station %>">hier auschecken</a></td>
						</tr>
					% }
				</tbody>
			</table>
		</div>
	</div>
% }