summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Controller
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-06-10 16:26:32 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-06-10 16:26:32 +0200
commitb48996cff3bc4e72bf017b2b3fdcffcfd3780a5f (patch)
tree5488c0720fd7002495892dc26780122ed9db73d4 /lib/DBInfoscreen/Controller
parent5686110134e0fa5afbef038f2f46db7983c4bc4b (diff)
add head nav and prominent geolocation link to app template
Diffstat (limited to 'lib/DBInfoscreen/Controller')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm35
1 files changed, 17 insertions, 18 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 862ba12..e0e778d 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -373,22 +373,22 @@ sub handle_request {
my $via = $self->param('via');
my @platforms = split( /,/, $self->param('platforms') // q{} );
- my @lines = split( /,/, $self->param('lines') // q{} );
- my $template = $self->param('mode') // 'app';
- my $hide_low_delay = $self->param('hidelowdelay') // 0;
- my $hide_opts = $self->param('hide_opts') // 0;
+ my @lines = split( /,/, $self->param('lines') // q{} );
+ my $template = $self->param('mode') // 'app';
+ my $hide_low_delay = $self->param('hidelowdelay') // 0;
+ my $hide_opts = $self->param('hide_opts') // 0;
my $show_realtime = $self->param('show_realtime') // 0;
- my $show_details = $self->param('detailed') // 0;
- my $backend = $self->param('backend') // 'iris';
- my $admode = $self->param('admode') // 'deparr';
- my $dark_layout = $self->param('dark') // 0;
- my $apiver = $self->param('version') // 0;
+ my $show_details = $self->param('detailed') // 0;
+ my $backend = $self->param('backend') // 'iris';
+ my $admode = $self->param('admode') // 'deparr';
+ my $dark_layout = $self->param('dark') // 0;
+ my $apiver = $self->param('version') // 0;
my $callback = $self->param('callback');
my $with_related = !$self->param('no_related');
my $save_defaults = $self->param('save_defaults') // 0;
- my $limit = $self->param('limit') // 0;
- my @train_types = split( /,/, $self->param('train_types') // q{} );
- my %opt = (
+ my $limit = $self->param('limit') // 0;
+ my @train_types = split( /,/, $self->param('train_types') // q{} );
+ my %opt = (
cache_hafas => $self->app->cache_hafas,
cache_iris_main => $self->app->cache_iris_main,
cache_iris_rt => $self->app->cache_iris_rt,
@@ -423,6 +423,9 @@ sub handle_request {
elsif ( defined $station and $station =~ s{ [.] json $ }{}x ) {
$template = 'json';
}
+ elsif ( $template ne 'app' ) {
+ $self->stash( layout => 'legacy' );
+ }
# Historically, there were two JSON APIs: 'json' (undocumented, raw
# passthrough of serialized Travel::Status::DE::IRIS::Result /
@@ -452,11 +455,7 @@ sub handle_request {
$self->param( $param => $self->session($param) );
}
}
- $self->render(
- 'landingpage',
- hide_opts => 0,
- show_intro => 1
- );
+ $self->render( 'landingpage', show_intro => 1 );
return;
}
@@ -554,7 +553,7 @@ sub handle_request {
for my $result (@results) {
my $platform = ( split( qr{ }, $result->platform // '' ) )[0];
- my $delay = $result->delay;
+ my $delay = $result->delay;
if ( $backend eq 'iris' and $admode eq 'arr' and not $result->arrival )
{
next;