diff options
-rwxr-xr-x | lib/Travelynx.pm | 6 | ||||
-rw-r--r-- | templates/login.html.ep | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 0eeab09..0f602fe 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -2229,7 +2229,11 @@ sub startup { if ( $self->is_user_authenticated ) { return 1; } - $self->render( 'login', redirect_to => $self->req->url ); + $self->render( + 'login', + redirect_to => $self->req->url, + from => 'auth_required' + ); return undef; } ); diff --git a/templates/login.html.ep b/templates/login.html.ep index 7b225ec..a8d7296 100644 --- a/templates/login.html.ep +++ b/templates/login.html.ep @@ -44,6 +44,15 @@ </div> </div> % } + % elsif ($from eq 'auth_required') { + <div class="card"> + <div class="card-content"> + <span class="card-title">Login notwendig</span> + <p>Die aufgerufene Seite ist nur mit travelynx-Account zugänglich.</p> + <p><a href="/">Über travelynx</a> · <a href="/register">Registrieren</a></p> + </div> + </div> + % } </div> </div> % } |