summaryrefslogtreecommitdiff
path: root/templates/history_map.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/history_map.html.ep')
-rw-r--r--templates/history_map.html.ep130
1 files changed, 120 insertions, 10 deletions
diff --git a/templates/history_map.html.ep b/templates/history_map.html.ep
index 7bda06b..57ba81f 100644
--- a/templates/history_map.html.ep
+++ b/templates/history_map.html.ep
@@ -1,31 +1,141 @@
<div class="row">
<div class="col s12">
% if (@{$station_coordinates}) {
- Alle bisherigen Zugfahrten
+ Fahrten
% }
% else {
- Keine Zugfahrten gefunden.
+ 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, station_pairs => $station_pairs
+%= include '_map', station_coordinates => $station_coordinates, polyline_groups => $polyline_groups
-%= form_for '/history/map' => (method => 'POST') => begin
- %= csrf_field
+%= 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">
- <label>
- %= check_box include_manual => 1
- <span>Manuelle Einträge ohne Unterwegshalte mitberücksichtigen</span>
- </label>
+ %= 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" name="action" value="go">
+ <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>
+% }