summaryrefslogtreecommitdiff
path: root/app/views/projects/new.html.haml
blob: e4d76fed969b78375ba33359cacf80ce591ffc8d (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.project-edit-container
  .project-edit-errors
    = render 'projects/errors'
  .project-edit-content

    = form_for @project, remote: true, html: { class: 'new_project form-horizontal' } do |f|
      .form-group.project-name-holder
        = f.label :name, class: 'control-label' do
          %strong Project name
        .col-sm-10
          = f.text_field :name, placeholder: "Example Project", class: "form-control", tabindex: 1, autofocus: true, dir: 'auto'

      - if current_user.can_select_namespace?
        .form-group
          = f.label :namespace_id, class: 'control-label' do
            %span Namespace
          .col-sm-10
            = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'select2', tabindex: 2}

      %hr
      .js-toggle-container
        .form-group
          .col-sm-2
          .col-sm-10
            = link_to "#", class: 'js-toggle-button' do
              %i.icon-edit
              %span Customize repository name?
        .js-toggle-content.hide
          .form-group
            = f.label :path, class: 'control-label' do
              %span Repository name
            .col-sm-10
              .input-group
                = f.text_field :path, class: 'form-control', dir: 'auto'
                %span.input-group-addon .git

      .js-toggle-container
        .form-group
          .col-sm-2
          .col-sm-10
            = link_to "#", class: 'js-toggle-button' do
              %i.icon-upload-alt
              %span Import existing repository?
        .js-toggle-content.hide
          .form-group.import-url-data
            = f.label :import_url, class: 'control-label' do
              %span Import existing repo
            .col-sm-10
              = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git'
              .bs-callout.bs-callout-info
                This URL must be publicly accessible or you can add a username and password like this: https://username:password@gitlab.com/company/project.git.
                %br
                The import will time out after 4 minutes. For big repositories, use a clone/push combination.
      %hr

      .form-group
        = f.label :description, class: 'control-label' do
          Description
          %span.light (optional)
        .col-sm-10
          = f.text_area :description, placeholder: "Awesome project", class: "form-control", rows: 3, maxlength: 250, tabindex: 3, dir: 'auto'
      = render "visibility_level", f: f, visibility_level: gitlab_config.default_projects_features.visibility_level, can_change_visibility_level: true

      .form-actions
        = f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4

        - if current_user.can_create_group?
          .pull-right
            .light
              Need a group for several dependent projects?
              = link_to new_group_path, class: "btn btn-tiny" do
                Create a group

.save-project-loader.hide
  .center
    %h2
      %i.icon-spinner.icon-spin
      Creating project & repository.
    %p Please wait a moment, this page will automatically refresh when ready.