diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-08-01 17:00:55 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-08-01 17:00:55 +0100 |
commit | ba7c65a648d568b1788a4f97b893615c58febca9 (patch) | |
tree | 20bbacdb1d1d49345cfe2e72d471b8405422e951 /app/views/import | |
parent | 54e3361fa822b795e3b8ff47764f38b321f0493d (diff) | |
download | gitlab-ce-ba7c65a648d568b1788a4f97b893615c58febca9.tar.gz |
Adds export form and enables export button by default
Diffstat (limited to 'app/views/import')
-rw-r--r-- | app/views/import/gitlab_projects/new.html.haml | 58 |
1 files changed, 42 insertions, 16 deletions
diff --git a/app/views/import/gitlab_projects/new.html.haml b/app/views/import/gitlab_projects/new.html.haml index 767dffb5589..e20e31e0b32 100644 --- a/app/views/import/gitlab_projects/new.html.haml +++ b/app/views/import/gitlab_projects/new.html.haml @@ -5,21 +5,47 @@ Import an exported GitLab project %hr -= form_tag import_gitlab_project_path, class: 'form-horizontal', multipart: true do - %p - Project will be imported as - %strong - #{@namespace.name}/#{@path} += form_for import_gitlab_project_path, class: 'form-horizontal', multipart: true do |f| + .row + .form-group.col-xs-12.col-sm-6 + = f.label :namespace_id, class: 'label-light' do + %span + Project path + .form-group + .input-group + - if current_user.can_select_namespace? + .input-group-addon + = root_url + = f.select :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), {}, { class: 'select2 js-select-namespace', tabindex: 1} - %p - To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here. - .form-group - = hidden_field_tag :namespace_id, @namespace.id - = hidden_field_tag :path, @path - = label_tag :file, class: 'control-label' do - %span GitLab project export - .col-sm-10 - = file_field_tag :file, class: '' + - else + .input-group-addon.static-namespace + #{root_url}#{current_user.username}/ + = f.hidden_field :namespace_id, value: current_user.namespace_id + .form-group.col-xs-12.col-sm-6.project-path + = f.label :path, class: 'label-light' do + %span + Project name + = f.text_field :path, placeholder: "my-awesome-project", class: "js-path-name form-control", tabindex: 2, autofocus: true, required: true - .form-actions - = submit_tag 'Import project', class: 'btn btn-create' + + .row + .form-group.col-md-12 + To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here. + .row + .form-group.col-sm-12 + = hidden_field_tag :namespace_id, @namespace.id + = hidden_field_tag :path, @path + = f.label :file, class: 'label-light' do + %span + GitLab project export + .form-group + = file_field_tag :file, class: '' + .row + .form-actions + = f.submit 'Import project', class: 'btn btn-create' + = link_to 'Cancel', new_project_path, class: 'btn btn-cancel' + +:javascript + // get the path url and append it in the inputS + $('.js-path-name').val(gl.utils.getParameterValues('path')); |