summaryrefslogtreecommitdiff
path: root/templates/passengerrights.html.ep
blob: 3d5d21dd6b19bfc6a88664d53713e03db1355f34 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
<h1>Fahrgastrechte</h1>
<div class="row">
	<div class="col s12">
		<p>
			Gemäß der Fahrgastrechte im Eisenbahnverkehr besteht ab 60 Minuten
			Verspätung am Ziel ein Entschädigungsanspruch gegenüber dem
			Eisenbahnverkehrsunternehmen. Dieser kann mit dem
			Fahrgastrechteformular geltend gemacht werden.
		</p>
		<p>
			Die folgenden Zugfahrten sind wahrscheinliche Kandidaten dafür.
			Details zur jeweiligen Zugfahrt sind bereits im Formular eingetragen.
		</p>
	</div>
</div>

<div class="row">
	<div class="col s12">
		<table class="striped">
			<thead>
				<tr>
					<th>Datum</th>
					<th>Zug</th>
					<th>Grund</th>
					<th>Formular</th>
				</tr>
			</thead>
			<tbody>
				% for my $journey (@{$journeys}) {
					% my $detail_link = '/journey/' . $journey->{id};
					<tr>
						<td><%= $journey->{sched_departure}->strftime('%d.%m.%Y') %></td>
						<td><a href="<%= $detail_link %>">
							<%= $journey->{type} %> <%= $journey->{line} // $journey->{no} %>
							→ <%= $journey->{to_name} %>
							% if ($journey->{connection}) {
								% $detail_link = '/journey/' . $journey->{connection}{id};
								</a><br/><a href="<%= $detail_link %>">
								<%= $journey->{connection}{type} %> <%= $journey->{connection}{line} // $journey->{connection}{no} %>
								→ <%= $journey->{connection}{to_name} %>
							% }
						</a></td>
						<td>
							% if ($journey->{cancelled}) {
								% if ($journey->{has_substitute}) {
									Ausfall, Ersatzverbindung
									%= sprintf('%+d', $journey->{substitute_delay})
								% }
								% else {
									Ausfall ohne Ersatzverbindung
								% }
							% }
							% elsif ($journey->{connection}) {
								%= sprintf('%+d, ggf. Anschluss verpasst',  $journey->{delay})
							% }
							% else {
								%= sprintf('%+d',  $journey->{delay})
							% }
						</td>
						<td>
							% my $form_target = sprintf('/journey/passenger_rights/FGR %s %s %s.pdf', $journey->{sched_departure}->ymd, $journey->{type}, $journey->{no});
							%= form_for $form_target => (method => 'POST') => begin
								%= csrf_field
								%= hidden_field id => $journey->{id}
								<button class="btn waves-effect waves-light grey darken-3" type="submit" name="action" value="generate">
									<i class="material-icons">file_download</i>
								</button>
							%= end
						</td>
					</tr>
				% }
			</tbody>
		</table>
	</div>
</div>