summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-12-25 21:52:43 +0100
committerDaniel Friesel <derf@finalrewind.org>2015-12-25 21:52:43 +0100
commit08a0bdb1afa1c7ee598134e276e945f899688b81 (patch)
tree056b5ab66d55166cd6e9ac33724b9949e1e7e75e
parent2e474e5badebcb1f07bf40fe905714e8ff0d1cef (diff)
add recursive / with_related support for IRIS backend
-rw-r--r--index.pl5
-rw-r--r--templates/layouts/default.html.ep8
2 files changed, 13 insertions, 0 deletions
diff --git a/index.pl b/index.pl
index bbe07e0..095e0e1 100644
--- a/index.pl
+++ b/index.pl
@@ -304,6 +304,7 @@ sub handle_request {
my $show_realtime = $self->param('show_realtime') // 0;
my $backend = $self->param('backend') // 'iris';
my $admode = $self->param('admode') // 'deparr';
+ my $with_related = $self->param('recursive') // 0;
my $callback = $self->param('callback');
my $apiver = $self->param('version') // 0;
my %opt;
@@ -335,6 +336,10 @@ sub handle_request {
$opt{lookahead} = 120;
}
+ if ($with_related) {
+ $opt{with_related} = 1;
+ }
+
my @departures;
my $data = get_results_for( $backend, $station, %opt );
my $results_ref = $data->{results};
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 58669c6..2843843 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -147,6 +147,14 @@ Alle Angaben ohne Gewähr.
%= check_box 'show_realtime' => 1
</div>
</div>
+ <div class="field">
+ <div class="desc">
+ Betriebliche Bahnhofstrennungen ignorieren (z.B. "Hbf (Fern+Regio)" vs. "Hbf (S)")
+ </div>
+ <div>
+ %= check_box 'recursive' => 1
+ </div>
+ </div>
</div>
% end