new.html.haml 5.5 KB
Newer Older
P
Phil Hughes 已提交
1
- @breadcrumb_link = dashboard_projects_path
2
- breadcrumb_title "Projects"
3
- @hide_top_links = true
4
- page_title    'New Project'
5
- header_title  "Projects", dashboard_projects_path
B
Use dig  
blackst0ne 已提交
6
- visibility_level = params.dig(:project, :visibility_level) || default_project_visibility
7 8
- content_for :page_specific_javascripts do
  = webpack_bundle_tag 'project_new'
D
Douwe Maan 已提交
9

D
Dmitriy Zaporozhets 已提交
10
.project-edit-container
11
  .project-edit-errors
12
    = render 'projects/errors'
13 14 15 16
  .row.prepend-top-default
    .col-lg-3.profile-settings-sidebar
      %h4.prepend-top-0
        New project
A
Annabel Dunstone Gray 已提交
17 18 19 20
      %p
        A project is where you house your files (repository), plan your work (issues), and publish your documentation (wiki), #{link_to 'among other things', help_page_path("user/project/index.md", anchor: "projects-features"), target: '_blank'}.
      %p
        All features are enabled when you create a project, but you can disable the ones you don’t need in the project settings.
F
Filipa Lacerda 已提交
21
    .col-lg-9.js-toggle-container
A
Annabel Dunstone Gray 已提交
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
      %ul.nav-links.gitlab-tabs{ role: 'tablist' }
        %li.active{ role: 'presentation' }
          %a{ href: '#blank-project-pane', id: 'blank-project-tab', data: { toggle: 'tab' }, role: 'tab' }
            %span.hidden-xs Blank project
            %span.visible-xs Blank
        %li{ role: 'presentation' }
          %a{ href: '#create-from-template-pane', id: 'create-from-template-tab', data: { toggle: 'tab' }, role: 'tab' }
            %span.hidden-xs Create from template
            %span.visible-xs Template
        %li{ role: 'presentation' }
          %a{ href: '#import-project-pane', id: 'import-project-tab', data: { toggle: 'tab' }, role: 'tab' }
            %span.hidden-xs Import project
            %span.visible-xs Import

      .tab-content.gitlab-tab-content
        .tab-pane.active{ id: 'blank-project-pane', 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', role: 'tabpanel' }
          = form_for @project, html: { class: 'new_project' } do |f|
F
Filipa Lacerda 已提交
43
            .project-template
44
              .form-group
F
Filipa Lacerda 已提交
45
                %div
F
Filipa Lacerda 已提交
46
                  = render 'project_templates', f: f
A
Annabel Dunstone Gray 已提交
47 48 49 50

        .tab-pane.import-project-pane{ id: 'import-project-pane', role: 'tabpanel' }
          = form_for @project, html: { class: 'new_project' } do |f|
            - if import_sources_enabled?
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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
              .project-import.row
                .col-sm-12
                  .form-group.import-btn-container.clearfix
                    = f.label :visibility_level, class: 'label-light' do #the label here seems wrong
                      Import project from
                    .import-buttons
                      %div
                        - if github_import_enabled?
                          = link_to new_import_github_path, class: 'btn import_github' do
                            = icon('github', text: 'GitHub')
                      %div
                        - if bitbucket_import_enabled?
                          = link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}" do
                            = icon('bitbucket', text: 'Bitbucket')
                          - unless bitbucket_import_configured?
                            = render 'bitbucket_import_modal'
                      %div
                        - if gitlab_import_enabled?
                          = link_to status_import_gitlab_path, class: "btn import_gitlab #{'how_to_import_link' unless gitlab_import_configured?}" do
                            = icon('gitlab', text: 'GitLab.com')
                          - unless gitlab_import_configured?
                            = render 'gitlab_import_modal'
                      %div
                        - if google_code_import_enabled?
                          = link_to new_import_google_code_path, class: 'btn import_google_code' do
                            = icon('google', text: 'Google Code')
                      %div
                        - if fogbugz_import_enabled?
                          = link_to new_import_fogbugz_path, class: 'btn import_fogbugz' do
                            = icon('bug', text: 'Fogbugz')
                      %div
                        - if gitea_import_enabled?
                          = link_to new_import_gitea_url, class: 'btn import_gitea' do
                            = custom_icon('go_logo')
                            Gitea
                      %div
                        - if git_import_enabled?
                          %button.btn.js-toggle-button.import_git{ type: "button" }
                            = icon('git', text: 'Repo by URL')
                      - if gitlab_project_import_enabled?
                        .import_gitlab_project.has-tooltip{ data: { container: 'body' } }
                          = link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit' do
                            = icon('gitlab', text: 'GitLab export')
                .col-lg-12
                  .js-toggle-content.hide.toggle-import-form
                    %hr
                      = render "shared/import_form", f: f
                      = render 'new_project_fields', f: f, project_name_id: "import-url-name"
99

100
.save-project-loader.hide
101
  .center
102
    %h2
S
Sullivan SENECHAL 已提交
103
      %i.fa.fa-spinner.fa-spin
104
      Creating project & repository.
D
Dmitriy Zaporozhets 已提交
105
    %p Please wait a moment, this page will automatically refresh when ready.