summaryrefslogtreecommitdiff
path: root/app/views/projects/new.html.haml
blob: 5bb1bfb7059c5ef09383f9ec9d527c133d9c33a1 (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
- @breadcrumb_link = dashboard_projects_path
- breadcrumb_title "Projects"
- @hide_top_links = true
- page_title    'New Project'
- header_title  "Projects", dashboard_projects_path
- visibility_level = params.dig(:project, :visibility_level) || default_project_visibility
- active_tab = local_assigns.fetch(:active_tab, 'blank')

.project-edit-container
  .project-edit-errors
    = render 'projects/errors'
  .row.prepend-top-default
    .col-lg-3.profile-settings-sidebar
      %h4.prepend-top-0
        = _('New project')
      %p
        - among_other_things_link = link_to _('among other things'), help_page_path("user/project/index.md", anchor: "projects-features"), target: '_blank'
        = _('A project is where you house your files (repository), plan your work (issues), and publish your documentation (wiki), %{among_other_things_link}.').html_safe % { among_other_things_link: among_other_things_link }
      %p
        = _('All features are enabled for blank projects, from templates, or when importing, but you can disable them afterward in the project settings.')
      .md
        = brand_new_project_guidelines
      %p
        %strong= _("Tip:")
        = _("You can also create a project from the command line.")
        %a.push-new-project-tip{ data: { title: _("Push to create a project") }, href: help_page_path('gitlab-basics/create-project', anchor: 'push-to-create-a-new-project'), target: "_blank", rel: "noopener noreferrer" }
          = _("Show command")
        %template.push-new-project-tip-template= render partial: "new_project_push_tip"

    .col-lg-9.js-toggle-container
      %ul.nav.nav-tabs.nav-links.gitlab-tabs{ role: 'tablist' }
        %li.nav-item{ role: 'presentation' }
          %a.nav-link.active{ href: '#blank-project-pane', id: 'blank-project-tab', data: { toggle: 'tab' }, role: 'tab' }
            %span.d-none.d-sm-block Blank project
            %span.d-block.d-sm-none Blank
        %li.nav-item{ role: 'presentation' }
          %a.nav-link{ href: '#create-from-template-pane', id: 'create-from-template-tab', data: { toggle: 'tab' }, role: 'tab' }
            %span.d-none.d-sm-block Create from template
            %span.d-block.d-sm-none Template
        %li.nav-item{ role: 'presentation' }
          %a.nav-link{ href: '#import-project-pane', id: 'import-project-tab', data: { toggle: 'tab' }, role: 'tab' }
            %span.d-none.d-sm-block Import project
            %span.d-block.d-sm-none Import

      .tab-content.gitlab-tab-content
        .tab-pane{ id: 'blank-project-pane', class: active_when(active_tab == 'blank'), role: 'tabpanel' }
          = form_for @project, html: { class: 'new_project' } do |f|
            = render 'new_project_fields', f: f, project_name_id: "blank-project-name"

        .tab-pane.no-padding{ id: 'create-from-template-pane', class: active_when(active_tab == 'template'), role: 'tabpanel' }
          = form_for @project, html: { class: 'new_project' } do |f|
            .project-template
              .form-group
                %div
                  = render 'project_templates', f: f

        .tab-pane.import-project-pane.js-toggle-container{ id: 'import-project-pane', class: active_when(active_tab == 'import'), role: 'tabpanel' }
          = form_for @project, html: { class: 'new_project' } do |f|
            - if import_sources_enabled?
              = render 'import_project_pane', f: f, active_tab: active_tab
            - else
              .nothing-here-block
                %h4 No import options available
                %p Contact an administrator to enable options for importing your project.

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