diff --git a/index.pl b/index.pl index 467eed4..7fb6681 100755 --- a/index.pl +++ b/index.pl @@ -1458,7 +1458,11 @@ get '/s/*station' => sub { my $status = get_departures($station); if ( $status->{errstr} ) { - $self->render( 'landingpage', error => $status->{errstr} ); + $self->render( + 'landingpage', + with_geolocation => 1, + error => $status->{errstr} + ); } else { # You can't check into a train which terminates here diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index 6ebf726..c672dd2 100644 --- a/templates/landingpage.html.ep +++ b/templates/landingpage.html.ep @@ -1,4 +1,16 @@ % if (is_user_authenticated()) { + % if (stash('error')) { +
+
+
+
+ Backend-Fehler +

<%= stash('error') %>

+
+
+
+
+ % }
% my $status = get_user_status(); @@ -35,7 +47,7 @@
%= form_for 'list_departures' => begin -
+
%= text_field 'station', id => 'station', class => 'autocomplete white-text', require => undef