From 160651f0bb465074b3b6ff1a0faa613da5586fb1 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 29 Mar 2021 12:01:52 +0200 Subject: add train search (beta, not linked yet) --- lib/DBInfoscreen.pm | 6 +++++- lib/DBInfoscreen/Controller/Static.pm | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index 70b4b5e..7a0bea4 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -369,7 +369,11 @@ sub startup { $r->get('/_redirect')->to('static#redirect'); - $r->get('/_auto')->to('static#geolocation'); + # legacy entry point + $r->get('/_auto')->to('static#geostop'); + + $r->get('/_autostop')->to('static#geostop'); + $r->get('/_autotrain')->to('static#geotrain'); $r->get('/_datenschutz')->to('static#privacy'); diff --git a/lib/DBInfoscreen/Controller/Static.pm b/lib/DBInfoscreen/Controller/Static.pm index c25c6c5..16eeb9a 100644 --- a/lib/DBInfoscreen/Controller/Static.pm +++ b/lib/DBInfoscreen/Controller/Static.pm @@ -39,13 +39,23 @@ sub redirect { } } -sub geolocation { +sub geostop { my ($self) = @_; $self->render( - 'geolocation', - with_geolocation => 1, - hide_opts => 1 + 'geostop', + with_geostop => 1, + hide_opts => 1 + ); +} + +sub geotrain { + my ($self) = @_; + + $self->render( + 'geotrain', + with_geotrain => 1, + hide_opts => 1 ); } -- cgit v1.2.3