summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-10-15 21:39:24 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-10-15 21:39:24 +0200
commit8abf82949f12ea62fd04ccd0357d4d7858f28c4d (patch)
tree55eae495b23a6e3282930f675972f71aa0290eb9 /lib/DBInfoscreen
parent951581a95a95d43e59ebec8588e00c7f0f37306d (diff)
fix forward button when navigating back to train details3.4.3
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm10
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 {