diff options
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 2bf2bcb..609eefd 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -648,6 +648,10 @@ sub train_details { my $train_no = $self->stash('train'); my $station = $self->stash('station'); + if ( $self->param('ajax') ) { + delete $self->stash->{layout}; + } + my %opt = ( cache_hafas => $self->app->cache_hafas, cache_iris_main => $self->app->cache_iris_main, @@ -739,9 +743,11 @@ sub train_details { $self->stash( title => $data->{station_name} // $self->stash('station') ); $self->stash( hide_opts => 1 ); - $self->render_train( $result, $result_info, + $self->render_train( + $result, $result_info, $data->{station_name} // $self->stash('station'), - 'train_details' ); + $self->param('ajax') ? '_train_details' : 'train_details' + ); } sub handle_result { |