summaryrefslogtreecommitdiff
path: root/app/views/import/gitlab_projects/new.html.haml
blob: 294de4572bd6a5e12ff0f20a5a5b113d117b7a30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
- page_title "GitLab Import"
- header_title "Projects", root_path
%h3.page-title
  = icon('gitlab')
  Import an exported GitLab project
%hr

= form_for import_gitlab_project_path, html: { class: 'new_project' }, 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}

          - 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


  .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'));