summaryrefslogtreecommitdiff
path: root/app/views/import/gitlab_projects/new.html.haml
blob: 5e4595d930b897ec632db5aebe1c3147ff93c48b (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
- page_title _("GitLab Import")
- header_title _("Projects"), root_path

%h3.page-title
  = icon('gitlab')
  = _('Import an exported GitLab project')
%hr

= form_tag import_gitlab_project_path, class: 'new_project', multipart: true do
  .row
    .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 input-lg", autofocus: true
    .form-group.col-12.col-sm-6
      = label_tag :namespace_id, _('Project URL'), class: 'label-bold'
      .form-group
        .input-group
          - if current_user.can_select_namespace?
            .input-group-prepend.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', tabindex: 1

          - 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, value: current_user.namespace_id
    .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", tabindex: 2, 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
      = label_tag :file, _('GitLab project export'), class: 'label-bold'
      .form-group
        = file_field_tag :file, class: ''
  .row
    .form-actions.col-sm-12
      = submit_tag _('Import project'), class: 'btn btn-success'
      = link_to _('Cancel'), new_project_path, class: 'btn btn-cancel'