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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-17 18:08:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-17 18:08:15 +0300
commit00789fa09eb9a3c7145c9bb5021c06f48b9f173a (patch)
tree6bedcfd6046918db573ab264e8d7591b8c3384dc /app/views/import
parenta19ddcd17a0fb99f9d4c3b1505ab47f13f87b8bb (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/import')
-rw-r--r--app/views/import/manifest/_form.html.haml13
-rw-r--r--app/views/import/shared/_new_project_form.html.haml29
2 files changed, 24 insertions, 18 deletions
diff --git a/app/views/import/manifest/_form.html.haml b/app/views/import/manifest/_form.html.haml
index b50b376fdf2..a35e9ea3fcf 100644
--- a/app/views/import/manifest/_form.html.haml
+++ b/app/views/import/manifest/_form.html.haml
@@ -2,11 +2,14 @@
.form-group
= label_tag :group_id, nil, class: 'label-bold' do
= _('Group')
- .input-group
- .input-group-prepend.has-tooltip{ title: root_url }
- .input-group-text
- = root_url
- = select_tag :group_id, namespaces_options(params[:namespace_id], display_path: true, groups_only: true), { class: 'select2 js-select-namespace' }
+ .input-group.gl-max-w-62
+ - namespace_id = namespace_id_from(params) || current_user.manageable_groups(include_groups_with_developer_maintainer_access: true)&.first&.id
+ - namespace_full_path = GroupFinder.new(current_user).execute(id: namespace_id)&.full_path
+ .js-vue-new-project-url-select{ data: { namespace_full_path: namespace_full_path,
+ namespace_id: namespace_id ,
+ input_id: 'group_id',
+ input_name: 'group_id',
+ root_url: root_url } }
.form-text.text-muted
= _('Choose the top-level group for your repository imports.')
diff --git a/app/views/import/shared/_new_project_form.html.haml b/app/views/import/shared/_new_project_form.html.haml
index 16526382f42..6000612a285 100644
--- a/app/views/import/shared/_new_project_form.html.haml
+++ b/app/views/import/shared/_new_project_form.html.haml
@@ -2,20 +2,23 @@
.form-group.project-name.col-sm-12
= label_tag :name, _('Project name'), class: 'label-bold'
= text_field_tag :name, @name, placeholder: "My awesome project", class: "js-project-name form-control gl-form-input input-lg", autofocus: true, required: true, aria: { required: true }, data: { qa_selector: 'project_name_field' }
- .form-group.col-12.col-sm-6
+ .form-group.col-12.col-sm-6.gl-pr-0
= label_tag :namespace_id, _('Project URL'), class: 'label-bold'
- .form-group
- .input-group.gl-flex-nowrap
- - if current_user.can_select_namespace?
- .input-group-prepend.flex-shrink-0.has-tooltip{ title: root_url }
- .input-group-text
- = root_url
- = select_tag :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), class: 'select2 js-select-namespace block-truncated'
- - else
- .input-group-prepend.static-namespace.has-tooltip{ title: user_url(current_user.username) + '/' }
- .input-group-text.border-0
- #{user_url(current_user.username)}/
- = hidden_field_tag :namespace_id, current_user.namespace_id
+ .input-group.gl-flex-nowrap
+ - if current_user.can_select_namespace?
+ - namespace_id = namespace_id_from(params)
+ .js-vue-new-project-url-select{ data: { namespace_full_path: GroupFinder.new(current_user).execute(id: namespace_id)&.full_path || current_user.namespace.full_path,
+ namespace_id: namespace_id || current_user.namespace_id,
+ input_id: 'namespace_id',
+ input_name: 'namespace_id',
+ root_url: root_url,
+ user_namespace_id: current_user.namespace_id } }
+ - else
+ .input-group-prepend.static-namespace.flex-shrink-0.has-tooltip{ title: user_url(current_user.username) + '/' }
+ .input-group-text.border-0
+ #{user_url(current_user.username)}/
+ = hidden_field_tag :namespace_id, current_user.namespace_id
+ .gl-align-self-center.gl-pl-5 /
.form-group.col-12.col-sm-6.project-path
= label_tag :path, _('Project slug'), class: 'label-bold'
= text_field_tag :path, @path, placeholder: "my-awesome-project", class: "js-path-name form-control gl-form-input", required: true, aria: { required: true }, data: { qa_selector: 'project_slug_field' }