summaryrefslogtreecommitdiff
path: root/app/views/import
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-08-08 15:05:58 +0200
committerJames Lopez <james@jameslopez.es>2016-09-20 10:14:39 +0200
commit0c65112da79e177da3574458c3bb5befc349fd30 (patch)
treef3715fa7342143d1fd7bd53278c3ecf279e87c49 /app/views/import
parent95b9421ad3b2678da6e0af0131eafd52cdd0b2a5 (diff)
downloadgitlab-ce-0c65112da79e177da3574458c3bb5befc349fd30.tar.gz
modify github import JS and controller so we can now specify a namespace and/or name for a project.
- Fixed and added specs. - Added different namespace options depending on user privilages - Updated docs.
Diffstat (limited to 'app/views/import')
-rw-r--r--app/views/import/github/status.html.haml13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml
index bd3be20c4f8..8e552fbd005 100644
--- a/app/views/import/github/status.html.haml
+++ b/app/views/import/github/status.html.haml
@@ -45,7 +45,18 @@
%td
= github_project_link(repo.full_name)
%td.import-target
- = import_project_target(repo.owner.login, repo.name)
+ %fieldset.row
+ .input-group
+ .col-xs-11.col-sm-5.project-path
+ - if current_user.can_select_namespace? && !current_user.can_create_group?
+ = select_tag :namespace_id, namespaces_options(params[:namespace_id] || :current_user, display_path: true), {class: 'project-path select2 js-select-namespace', tabindex: 1}
+ - elsif current_user.can_create_group?
+ = select_tag :namespace_id, namespaces_options(params[:namespace_id] || :current_user, [repo.owner.login]), {class: 'project-path select2 js-select-namespace', tabindex: 1}
+ - else
+ = text_field_tag :path, current_user.namespace_path, class: "form-control", tabindex: 2, autofocus: true, disabled: true
+
+ .col-xs-12.col-sm-6.project-path
+ = text_field_tag :path, repo.name, class: "form-control", tabindex: 2, autofocus: true, required: true
%td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do
Import