2017-07-07 10:51:03 +00:00
- @breadcrumb_link = dashboard_projects_path
2017-07-12 08:16:32 +00:00
- breadcrumb_title "Projects"
2017-07-06 16:24:03 +00:00
- @hide_top_links = true
2015-05-01 08:39:11 +00:00
- page_title 'New Project'
2016-05-26 16:06:11 +00:00
- header_title "Projects", dashboard_projects_path
2017-03-13 20:24:30 +00:00
- visibility_level = params.dig(:project, :visibility_level) || default_project_visibility
2018-02-14 23:52:36 +00:00
- active_tab = local_assigns.fetch(:active_tab, 'blank')
2015-12-02 13:27:29 +00:00
2013-08-12 14:21:57 +00:00
.project-edit-container
2013-05-14 09:46:41 +00:00
.project-edit-errors
2013-05-14 09:56:03 +00:00
= render 'projects/errors'
2016-06-08 01:10:55 +00:00
.row.prepend-top-default
.col-lg-3.profile-settings-sidebar
%h4.prepend-top-0
2018-02-21 02:23:49 +00:00
= _('New project')
2017-10-11 09:07:19 +00:00
%p
2018-02-21 02:23:49 +00:00
- 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 }
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.')
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.")
%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"
2017-07-30 10:56:40 +00:00
.col-lg-9.js-toggle-container
2017-10-11 09:07:19 +00:00
%ul.nav-links.gitlab-tabs{ role: 'tablist' }
2018-02-21 02:23:49 +00:00
%li{ class: active_when(active_tab == 'blank'), role: 'presentation' }
2017-10-11 09:07:19 +00:00
%a{ href: '#blank-project-pane', id: 'blank-project-tab', data: { toggle: 'tab' }, role: 'tab' }
2018-04-09 21:50:40 +00:00
%span.d-none.d-sm-block Blank project
2017-10-11 09:07:19 +00:00
%span.visible-xs Blank
2018-02-21 02:23:49 +00:00
%li{ class: active_when(active_tab == 'template'), role: 'presentation' }
2017-10-11 09:07:19 +00:00
%a{ href: '#create-from-template-pane', id: 'create-from-template-tab', data: { toggle: 'tab' }, role: 'tab' }
2018-04-09 21:50:40 +00:00
%span.d-none.d-sm-block Create from template
2017-10-11 09:07:19 +00:00
%span.visible-xs Template
2018-02-21 02:23:49 +00:00
%li{ class: active_when(active_tab == 'import'), role: 'presentation' }
2017-10-11 09:07:19 +00:00
%a{ href: '#import-project-pane', id: 'import-project-tab', data: { toggle: 'tab' }, role: 'tab' }
2018-04-09 21:50:40 +00:00
%span.d-none.d-sm-block Import project
2017-10-11 09:07:19 +00:00
%span.visible-xs Import
.tab-content.gitlab-tab-content
2018-02-21 02:23:49 +00:00
.tab-pane{ 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"
2018-02-21 02:23:49 +00:00
.tab-pane.no-padding{ id: 'create-from-template-pane', class: active_when(active_tab == 'template'), role: 'tabpanel' }
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
2017-07-30 10:56:40 +00:00
= render 'project_templates', f: f
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' }
2017-10-11 09:07:19 +00:00
= form_for @project, html: { class: 'new_project' } do |f|
- if import_sources_enabled?
2017-10-11 15:45:39 +00:00
.project-import.row
2018-02-21 02:23:49 +00:00
.col-lg-12
2017-10-11 15:45:39 +00:00
.form-group.import-btn-container.clearfix
= f.label :visibility_level, class: 'label-light' do #the label here seems wrong
Import project from
.import-buttons
2017-10-11 18:36:00 +00:00
- 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')
2017-10-11 15:45:39 +00:00
%div
- if github_import_enabled?
2018-03-07 15:58:50 +00:00
= link_to new_import_github_path, class: 'btn js-import-github' do
2017-10-11 15:45:39 +00:00
= 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?
2017-12-05 02:18:45 +00:00
= link_to new_import_gitea_path, class: 'btn import_gitea' do
2017-10-11 15:45:39 +00:00
= custom_icon('go_logo')
Gitea
%div
- if git_import_enabled?
2018-02-21 02:23:49 +00:00
%button.btn.js-toggle-button.js-import-git-toggle-button{ type: "button", data: { toggle_open_class: 'active' } }
2017-10-11 15:45:39 +00:00
= icon('git', text: 'Repo by URL')
.col-lg-12
2018-02-14 23:52:36 +00:00
.js-toggle-content.toggle-import-form{ class: ('hide' if active_tab != 'import') }
2017-10-11 15:45:39 +00:00
%hr
= render "shared/import_form", f: f
= render 'new_project_fields', f: f, project_name_id: "import-url-name"
2013-05-14 09:46:41 +00:00
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
2014-10-01 22:21:29 +00:00
%i.fa.fa-spinner.fa-spin
2014-02-05 18:30:57 +00:00
Creating project & repository.
2013-08-12 14:21:57 +00:00
%p Please wait a moment, this page will automatically refresh when ready.