summaryrefslogtreecommitdiff
path: root/templates/history_map.html.ep
blob: 57ba81f3529cf9bf4cc28f445f6a992ede66d1d9 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<div class="row">
	<div class="col s12">
		% if (@{$station_coordinates}) {
			Fahrten
		% }
		% else {
			Keine Fahrten
		% }
		% if (param('filter_type')) {
			mit <strong><%= param('filter_type') %></strong>
		% }
		% if (stash('year')) {
			im Jahr <strong><%= stash('year') %></strong>
		% }
		% elsif (param('filter_from') and param('filter_to')) {
			zwischen dem <strong><%= param('filter_from') %></strong> und dem <strong><%= param('filter_to') %></strong>
		% }
		% elsif (param('filter_from')) {
			ab dem <strong><%= param('filter_from') %></strong>
		% }
		% elsif (param('filter_to')) {
			bis einschließlich <strong><%= param('filter_to') %></strong>
		% }
		% elsif (@{$station_coordinates}) {
			in travelynx
		% }
		% if (not @{$station_coordinates}) {
			gefunden
		% }
	</div>
</div>

%= include '_map', station_coordinates => $station_coordinates, polyline_groups => $polyline_groups

%= form_for '/history/map' => begin
	<p>
		Detailgrad:
	</p>
	<div class="row">
		<div class="input-field col s12">
			<div>
				<label>
					%= radio_button route_type => 'polyline'
					<span>Nur Fahrten mit bekanntem Streckenverlauf eintragen</span>
				</label>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="input-field col s12">
			<div>
				<label>
					%= radio_button route_type => 'polybee'
					<span>Streckenverlauf wenn bekannt, sonst Luftlinie zwischen Unterweghalten</span>
				</label>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="input-field col s12">
			<div>
				<label>
					%= radio_button route_type => 'beeline'
					<span>Immer Luftlinie zwischen Unterwegshalten zeigen</span>
				</label>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="input-field col s12">
			<div>
				<label>
					%= check_box include_manual => 1
					<span>Manuelle Einträge ohne Unterwegshalte mitberücksichtigen</span>
				</label>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col s12 center-align">
			<button class="btn wave-effect waves-light" type="submit">
				Anzeigen
			</button>
		</div>
	</div>
	<p>
		Weitere Filter:
	</p>
	<div class="row">
		<div class="input-field col s12">
			%= text_field 'filter_from', id => 'filter_from', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9]( +[0-9][0-9]:[0-9][0-9])?'
			<label for="filter_from">Abfahrt ab (DD.MM.YYYY)</label>
		</div>
	</div>
	<div class="row">
		<div class="input-field col s12">
			%= text_field 'filter_to', id => 'filter_to', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9]( +[0-9][0-9]:[0-9][0-9])?'
			<label for="filter_to">Abfahrt bis (DD.MM.YYYY)</label>
		</div>
	</div>
	<div class="row">
		<div class="input-field col s12">
			%= text_field 'filter_type', id => 'filter_type'
			<label for="filter_tpye">Verkehrsmittel</label>
		</div>
	</div>
	<div class="row">
		<div class="col s12 center-align">
			<button class="btn wave-effect waves-light" type="submit">
				Anzeigen
			</button>
		</div>
	</div>
%= end

<div class="row">
	<div class="col s12">
		<p>
			Die eingezeichneten Routen stammen aus dem HAFAS und sind im Detail
			oft fehlerbehaftet.
		</p>
	</div>
</div>

% if (@{$skipped_journeys // []}) {
	<div class="row">
		<div class="col s12">
			<p>
				Die folgenden Fahrten wurden nicht eingezeichnet:
			</p>
			<p>
				<ul>
					% for my $pair (@{$skipped_journeys}) {
						% my ($journey, $reason) = @{$pair};
						<li><a href="/journey/<%= $journey->{id} %>"><%= $journey->{type} %> <%= $journey->{no} %> <%= $journey->{from_name} %> → <%= $journey->{to_name} %></a>: <%= $reason %></li>
					% }
				</ul>
			</p>
		</div>
	</div>
% }