Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
c4a56797
Commit
c4a56797
authored
Dec 15, 2014
by
skv-headless
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transfer error handler
parent
19865b7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
12 deletions
+4
-12
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+0
-6
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+3
-0
app/views/projects/transfer.js.haml
app/views/projects/transfer.js.haml
+1
-6
No files found.
app/assets/javascripts/application.js.coffee
View file @
c4a56797
...
@@ -51,12 +51,6 @@ window.ajaxGet = (url) ->
...
@@ -51,12 +51,6 @@ window.ajaxGet = (url) ->
window
.
showAndHide
=
(
selector
)
->
window
.
showAndHide
=
(
selector
)
->
window
.
errorMessage
=
(
message
)
->
ehtml
=
$
(
"<p>"
)
ehtml
.
addClass
(
"error_message"
)
ehtml
.
html
(
message
)
ehtml
window
.
split
=
(
val
)
->
window
.
split
=
(
val
)
->
return
val
.
split
(
/,\s*/
)
return
val
.
split
(
/,\s*/
)
...
...
app/controllers/projects_controller.rb
View file @
c4a56797
...
@@ -44,6 +44,9 @@ class ProjectsController < ApplicationController
...
@@ -44,6 +44,9 @@ class ProjectsController < ApplicationController
def
transfer
def
transfer
::
Projects
::
TransferService
.
new
(
project
,
current_user
,
project_params
).
execute
::
Projects
::
TransferService
.
new
(
project
,
current_user
,
project_params
).
execute
if
@project
.
errors
[
:namespace_id
].
present?
flash
[
:alert
]
=
@project
.
errors
[
:namespace_id
].
first
end
end
end
def
show
def
show
...
...
app/views/projects/transfer.js.haml
View file @
c4a56797
-
if
@project
.
errors
[
:namespace_id
].
present?
:plain
:plain
$("#tab-transfer .errors-holder").replaceWith(errorMessage('
#{
escape_javascript
(
@project
.
errors
[
:namespace_id
].
first
)
}
'));
$("#tab-transfer .form-actions input").removeAttr('disabled').removeClass('disabled');
-
else
:plain
location.href = "
#{
edit_project_path
(
@project
)
}
";
location.href = "
#{
edit_project_path
(
@project
)
}
";
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment