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
2017-07-25 08:41:43 +00:00
- content_for :page_specific_javascripts do
= webpack_bundle_tag 'project_new'
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
New project
2017-07-11 20:57:00 +00:00
- if import_sources_enabled?
%p
2017-09-18 10:11:39 +00:00
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.
2017-07-30 10:56:40 +00:00
.col-lg-9.js-toggle-container
2016-06-08 01:10:55 +00:00
= form_for @project, html: { class: 'new_project' } do |f|
2017-08-03 10:37:08 +00:00
.create-project-options
.first-column
2017-07-30 10:56:40 +00:00
.project-template
2017-08-01 12:23:04 +00:00
.form-group
2017-07-30 10:56:40 +00:00
= f.label :template_project, class: 'label-light' do
Create from template
2017-08-15 12:19:30 +00:00
= link_to icon('question-circle'), help_page_path("gitlab-basics/create-project"), target: '_blank', aria: { label: "What’ s included in a template?" }, title: "What’ s included in a template?", class: 'has-tooltip', data: { placement: 'top'}
2017-07-31 16:33:10 +00:00
%div
2017-07-30 10:56:40 +00:00
= render 'project_templates', f: f
2017-09-06 20:32:36 +00:00
- if import_sources_enabled?
.second-column
2017-07-30 10:56:40 +00:00
.project-import
.form-group.clearfix
= f.label :visibility_level, class: 'label-light' do #the label here seems wrong
Import project from
.col-sm-12.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')
2017-08-24 10:43:11 +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')
2016-06-08 01:10:55 +00:00
2017-07-30 10:56:40 +00:00
.row
.col-lg-12
2016-06-08 01:10:55 +00:00
.js-toggle-content.hide
2017-07-30 10:56:40 +00:00
%hr
= render "shared/import_form", f: f
2017-07-30 11:01:13 +00:00
%hr
2016-06-08 01:10:55 +00:00
2017-07-26 12:21:53 +00:00
.row
.form-group.col-xs-12.col-sm-6
= f.label :namespace_id, class: 'label-light' do
%span
Project path
.form-group
.input-group
- if current_user.can_select_namespace?
.input-group-addon
= root_url
= f.select :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), {}, { class: 'select2 js-select-namespace', tabindex: 1}
- else
.input-group-addon.static-namespace
#{root_url}#{current_user.username}/
= f.hidden_field :namespace_id, value: current_user.namespace_id
.form-group.col-xs-12.col-sm-6.project-path
= f.label :path, class: 'label-light' do
%span
Project name
= f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 2, autofocus: true, required: true
- if current_user.can_create_group?
.help-block
Want to house several dependent projects under the same namespace?
= link_to "Create a group", new_group_path
2016-06-08 01:10:55 +00:00
.form-group
= f.label :description, class: 'label-light' do
Project description
%span.light (optional)
= f.text_area :description, placeholder: 'Description format', class: "form-control", rows: 3, maxlength: 250
2017-08-25 18:00:01 +00:00
.form-group.visibility-level-setting
2016-06-08 01:10:55 +00:00
= f.label :visibility_level, class: 'label-light' do
Visibility Level
2017-06-06 15:05:13 +00:00
= link_to icon('question-circle'), help_page_path("public_access/public_access"), aria: { label: 'Documentation for Visibility Level' }
2017-03-11 14:20:22 +00:00
= render 'shared/visibility_level', f: f, visibility_level: visibility_level.to_i, can_change_visibility_level: true, form_model: @project, with_label: false
2013-05-14 09:46:41 +00:00
2013-08-01 13:20:18 +00:00
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4
2015-12-02 13:31:15 +00:00
= link_to 'Cancel', dashboard_projects_path, class: 'btn btn-cancel'
2013-05-14 09:46:41 +00:00
2014-01-01 19:42:42 +00:00
.save-project-loader.hide
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.