Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OHR Support
Manage
Activity
Members
Labels
Plan
Issues
97
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
OHR Support
Commits
0049f821
Commit
0049f821
authored
13 years ago
by
Holger Just
Browse files
Options
Downloads
Patches
Plain Diff
Redirect back to where I came from when loggin in via the menu form
parent
58a7182e
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/application_controller.rb
+3
-0
3 additions, 0 deletions
app/controllers/application_controller.rb
app/views/account/_login.rhtml
+1
-0
1 addition, 0 deletions
app/views/account/_login.rhtml
with
4 additions
and
0 deletions
app/controllers/application_controller.rb
+
3
−
0
View file @
0049f821
...
...
@@ -281,6 +281,9 @@ class ApplicationController < ActionController::Base
end
def
redirect_back_or_default
(
default
)
p
params
[
:back_url
].
to_s
p
URI
.
escape
(
CGI
.
unescape
(
params
[
:back_url
].
to_s
))
back_url
=
URI
.
escape
(
CGI
.
unescape
(
params
[
:back_url
].
to_s
))
if
!
back_url
.
blank?
begin
...
...
This diff is collapsed.
Click to expand it.
app/views/account/_login.rhtml
+
1
−
0
View file @
0049f821
<div
id=
"nav-login-content"
>
<%
form_tag
({
:controller
=>
"account"
,
:action
=>
"login"
})
do
%>
<%=
hidden_field_tag
(
'back_url'
,
CGI
.
escape
(
request
.
url
))
%>
<table>
<tr>
<td><label
for=
"username-pulldown"
>
<%=
l
(
:field_login
)
%>
</label></td>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment