diff options
author | Derf Null <derf@finalrewind.org> | 2023-04-18 22:51:57 +0200 |
---|---|---|
committer | Derf Null <derf@finalrewind.org> | 2023-04-18 22:51:57 +0200 |
commit | dfdf32b357ba057325fb02f6363706d18733a418 (patch) | |
tree | 0a06e4ba4aac4818800cddb251f3e152734cbc83 /lib/DBInfoscreen/Controller/Static.pm | |
parent | abb12f02c6b45eea4d553da8e4b719e78d18606a (diff) |
stop search: add hafas support
Diffstat (limited to 'lib/DBInfoscreen/Controller/Static.pm')
-rw-r--r-- | lib/DBInfoscreen/Controller/Static.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Static.pm b/lib/DBInfoscreen/Controller/Static.pm index e30b34f..63b3b8c 100644 --- a/lib/DBInfoscreen/Controller/Static.pm +++ b/lib/DBInfoscreen/Controller/Static.pm @@ -42,8 +42,23 @@ sub redirect { sub geostop { my ($self) = @_; + my ( $api_link, $api_text, $api_icon ); + if ( $self->param('hafas') ) { + $api_link = '/_autostop'; + $api_text = 'Auf Bahnverkehr wechseln'; + $api_icon = 'directions_bus'; + } + else { + $api_link = '/_autostop?hafas=1'; + $api_text = 'Auf Nahverkehr wechseln'; + $api_icon = 'train'; + } + $self->render( 'geostop', + api_link => $api_link, + api_text => $api_text, + api_icon => $api_icon, with_geostop => 1, hide_opts => 1 ); |