Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-06-15 18:31:00 +0300
committerJames Lopez <james@jameslopez.es>2016-06-15 18:31:00 +0300
commit4bde59341f6d4679b2eefa2c5e332c33c3c76050 (patch)
treed9c98b030da720f0d413f6ad5e3066cb67559fdd /app/controllers/import/gitlab_projects_controller.rb
parentf6896f9381b9d833e0db4d0e5be95f2ffc64561a (diff)
lots of refactoring again based on feedback. Changed the UI slightly and also fixed a small bug
Diffstat (limited to 'app/controllers/import/gitlab_projects_controller.rb')
-rw-r--r--app/controllers/import/gitlab_projects_controller.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/import/gitlab_projects_controller.rb b/app/controllers/import/gitlab_projects_controller.rb
index d63dd64b728..f99aa490d3e 100644
--- a/app/controllers/import/gitlab_projects_controller.rb
+++ b/app/controllers/import/gitlab_projects_controller.rb
@@ -3,6 +3,7 @@ class Import::GitlabProjectsController < Import::BaseController
def new
@namespace_id = project_params[:namespace_id]
+ @namespace_name = Namespace.find(project_params[:namespace_id]).name
@path = project_params[:path]
end
@@ -23,8 +24,8 @@ class Import::GitlabProjectsController < Import::BaseController
)
else
redirect_to(
- new_project_path,
- alert: "Project could not be exported: #{@project.errors.full_messages.join(', ')}"
+ new_import_gitlab_project_path,
+ alert: "Project could not be imported: #{@project.errors.full_messages.join(', ')}"
)
end
end
@@ -32,7 +33,7 @@ class Import::GitlabProjectsController < Import::BaseController
private
def file_is_valid?
- project_params[:file].respond_to?(:read)
+ project_params[:file] && project_params[:file].respond_to?(:read)
end
def verify_gitlab_project_import_enabled