2018-10-06 14:21:38 +00:00
- @hide_breadcrumbs = true
2017-07-06 16:24:03 +00:00
- @hide_top_links = true
2019-07-10 10:25:43 +00:00
- page_title _('New Project')
- header_title _("Projects"), dashboard_projects_path
2018-02-14 23:52:36 +00:00
- active_tab = local_assigns.fetch(:active_tab, 'blank')
2015-12-02 13:27:29 +00:00
2020-11-10 09:08:45 +00:00
.project-edit-container.gl-mt-5
2013-05-14 09:46:41 +00:00
.project-edit-errors
2013-05-14 09:56:03 +00:00
= render 'projects/errors'
2020-06-08 21:09:17 +00:00
2021-03-02 12:10:52 +00:00
.js-experiment-new-project-creation{ data: { is_ci_cd_available: (ci_cd_projects_available? if Gitlab.ee?), has_errors: @project.errors.any?, new_project_guidelines: brand_new_project_guidelines, push_to_create_project_command: push_to_create_project_command, working_with_projects_help_path: help_page_path("user/project/working_with_projects") } }
2020-06-08 21:09:17 +00:00
2020-11-24 06:09:49 +00:00
.row{ 'v-cloak': true }
2016-06-08 01:10:55 +00:00
.col-lg-3.profile-settings-sidebar
2020-05-21 18:08:27 +00:00
%h4.gl-mt-0
2018-02-21 02:23:49 +00:00
= _('New project')
2017-10-11 09:07:19 +00:00
%p
2020-07-03 21:09:31 +00:00
- among_other_things_link = link_to _('among other things'), help_page_path("user/project/index.md", anchor: "project-features"), target: '_blank'
2018-02-21 02:23:49 +00:00
= _('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 }
2017-10-11 09:07:19 +00:00
%p
2018-02-21 02:23:49 +00:00
= _('All features are enabled for blank projects, from templates, or when importing, but you can disable them afterward in the project settings.')
2019-04-24 10:49:31 +00:00
= render_if_exists 'projects/new_ci_cd_banner_external_repo'
2019-01-29 08:25:52 +00:00
%p
2020-05-15 18:07:52 +00:00
- pages_getting_started_guide = link_to _('Pages getting started guide'), help_page_path("user/project/pages/index", anchor: "getting-started"), target: '_blank'
2019-01-29 08:25:52 +00:00
= _('Information about additional Pages templates and how to install them can be found in our %{pages_getting_started_guide}.').html_safe % { pages_getting_started_guide: pages_getting_started_guide }
2017-12-07 12:54:49 +00:00
.md
= brand_new_project_guidelines
2018-02-23 09:00:19 +00:00
%p
%strong= _("Tip:")
= _("You can also create a project from the command line.")
2017-07-30 10:56:40 +00:00
.col-lg-9.js-toggle-container
2018-04-20 03:34:20 +00:00
%ul.nav.nav-tabs.nav-links.gitlab-tabs{ role: 'tablist' }
2018-06-05 14:47:06 +00:00
%li.nav-item{ role: 'presentation' }
2020-06-08 21:09:17 +00:00
%a.nav-link.active{ href: '#blank-project-pane', id: 'blank-project-tab', data: { toggle: 'tab', experiment_track_label: 'blank_project' }, role: 'tab' }
2019-07-10 10:25:43 +00:00
%span.d-none.d-sm-block= s_('ProjectsNew|Blank project')
%span.d-block.d-sm-none= s_('ProjectsNew|Blank')
2018-06-05 14:47:06 +00:00
%li.nav-item{ role: 'presentation' }
2020-06-08 21:09:17 +00:00
%a.nav-link{ href: '#create-from-template-pane', id: 'create-from-template-tab', data: { toggle: 'tab', experiment_track_label: 'create_from_template' }, role: 'tab' }
2019-07-10 10:25:43 +00:00
%span.d-none.d-sm-block.qa-project-create-from-template-tab= s_('ProjectsNew|Create from template')
%span.d-block.d-sm-none= s_('ProjectsNew|Template')
2018-06-05 14:47:06 +00:00
%li.nav-item{ role: 'presentation' }
2020-06-08 21:09:17 +00:00
%a.nav-link{ href: '#import-project-pane', id: 'import-project-tab', data: { toggle: 'tab', experiment_track_label: 'import_project' }, role: 'tab' }
2019-07-10 10:25:43 +00:00
%span.d-none.d-sm-block= s_('ProjectsNew|Import project')
%span.d-block.d-sm-none= s_('ProjectsNew|Import')
2019-04-24 10:49:31 +00:00
= render_if_exists 'projects/new_ci_cd_only_project_tab', active_tab: active_tab
2017-10-11 09:07:19 +00:00
.tab-content.gitlab-tab-content
2019-06-25 15:52:52 +00:00
.tab-pane.js-toggle-container{ id: 'blank-project-pane', class: active_when(active_tab == 'blank'), role: 'tabpanel' }
2017-10-11 09:07:19 +00:00
= form_for @project, html: { class: 'new_project' } do |f|
= render 'new_project_fields', f: f, project_name_id: "blank-project-name"
2019-06-25 15:52:52 +00:00
#create-from-template-pane.tab-pane.js-toggle-container.px-0.pb-0{ class: active_when(active_tab == 'template'), role: 'tabpanel' }
2021-04-30 09:10:21 +00:00
.gl-card.gl-my-5
.gl-card-body
%div
- contributing_templates_url = 'https://gitlab.com/gitlab-org/project-templates/contributing'
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: contributing_templates_url }
= _('Learn how to %{link_start}contribute to the built-in templates%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
2017-10-11 09:07:19 +00:00
= form_for @project, html: { class: 'new_project' } do |f|
2017-07-30 10:56:40 +00:00
.project-template
2017-08-01 12:23:04 +00:00
.form-group
2017-07-31 16:33:10 +00:00
%div
2018-10-17 20:47:18 +00:00
= render 'project_templates', f: f, project: @project
2017-10-11 09:07:19 +00:00
2018-02-21 02:23:49 +00:00
.tab-pane.import-project-pane.js-toggle-container{ id: 'import-project-pane', class: active_when(active_tab == 'import'), role: 'tabpanel' }
2018-07-02 09:16:24 +00:00
- if import_sources_enabled?
= render 'import_project_pane', active_tab: active_tab
- else
.nothing-here-block
2019-07-10 10:25:43 +00:00
%h4= s_('ProjectsNew|No import options available')
%p= s_('ProjectsNew|Contact an administrator to enable options for importing your project.')
2013-05-14 09:46:41 +00:00
2019-04-24 10:49:31 +00:00
= render_if_exists 'projects/new_ci_cd_only_project_pane', active_tab: active_tab
2018-04-09 18:50:35 +00:00
.save-project-loader.d-none
2014-06-21 07:41:44 +00:00
.center
2014-02-05 18:30:57 +00:00
%h2
2021-04-29 21:10:03 +00:00
.gl-spinner.gl-spinner-md.align-text-bottom
2019-07-10 10:25:43 +00:00
= s_('ProjectsNew|Creating project & repository.')
%p
= s_('ProjectsNew|Please wait a moment, this page will automatically refresh when ready.')