sessions.confirm_password=Confirm password
sessions.sign_up=Sign up
sessions.old_account=<a href="{0}" tabindex="-1">Log in</a> if you already have an account.
-session.flash_notice.logged_in=Logged in.
session.flash_notice.authentication_failed=Authentication failed.
session.flash_notice.logged_out=You have been logged out.
reset_session
end
+ def new
+ if params[:return_to]
+ # user clicked on the link "login" : redirect to the original uri after authentication
+ session[:return_to] = params[:return_to]
+ # else the original uri can be set by ApplicationController#access_denied
+ end
+ end
+
end
» <a href="<%= ApplicationController.root_context -%>/sessions/logout"><%= message('layout.logout') -%></a>
</li>
<% else %>
- <li><a href="<%= ApplicationController.root_context -%>/sessions/new"><%= message('layout.login') -%></a></li>
+ <li><a href="<%= ApplicationController.root_context -%>/sessions/new?return_to=<%= u (request.request_uri) -%>"><%= message('layout.login') -%></a></li>
<% end %>
<li><a href="<%= ApplicationController.root_context -%>/profiles"><%= message('layout.configuration') -%></a></li>
</ol>