2015-05-01 08:39:11 +00:00
- page_title 'New Project'
- header_title 'New Project'
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'
2013-05-14 09:46:41 +00:00
.project-edit-content
2013-09-13 12:39:04 +00:00
2015-06-27 01:53:17 +00:00
= form_for @project, html: { class: 'new_project form-horizontal js-requires-input' } do |f|
2013-12-30 23:27:02 +00:00
.form-group.project-name-holder
2014-12-22 11:27:48 +00:00
= f.label :path, class: 'control-label' do
2014-12-22 11:50:58 +00:00
%strong Project path
2013-12-30 23:27:02 +00:00
.col-sm-10
2014-12-22 11:27:48 +00:00
.input-group
2015-06-27 01:53:17 +00:00
= f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 1, autofocus: true, required: true
2014-12-22 11:27:48 +00:00
.input-group-addon
\.git
2013-05-14 09:46:41 +00:00
- if current_user.can_select_namespace?
2013-12-30 23:27:02 +00:00
.form-group
2013-12-31 14:01:25 +00:00
= f.label :namespace_id, class: 'control-label' do
2013-05-14 09:46:41 +00:00
%span Namespace
2013-12-30 23:27:02 +00:00
.col-sm-10
2014-01-11 10:11:54 +00:00
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'select2', tabindex: 2}
2013-05-14 09:46:41 +00:00
2015-08-14 13:56:33 +00:00
- if import_sources_enabled?
%hr
2015-03-19 14:06:05 +00:00
2015-08-14 13:56:33 +00:00
.project-import.js-toggle-container
.form-group
%label.control-label Import project from
.col-sm-10
- if github_import_enabled?
- if github_import_configured?
= link_to status_import_github_path, class: 'btn import_github' do
%i.fa.fa-github
GitHub
- else
= link_to '#', class: 'how_to_import_link light btn import_github' do
%i.fa.fa-github
GitHub
= render 'github_import_modal'
2015-03-19 14:06:05 +00:00
2015-08-14 13:56:33 +00:00
- if bitbucket_import_enabled?
- if bitbucket_import_configured?
= link_to status_import_bitbucket_path, class: 'btn import_bitbucket', "data-no-turbolink" => "true" do
%i.fa.fa-bitbucket
Bitbucket
- else
= link_to status_import_bitbucket_path, class: 'how_to_import_link light btn import_bitbucket', "data-no-turbolink" => "true" do
%i.fa.fa-bitbucket
Bitbucket
= render 'bitbucket_import_modal'
2015-03-19 14:06:05 +00:00
- if gitlab_import_enabled?
2015-08-14 13:56:33 +00:00
- if gitlab_import_configured?
= link_to status_import_gitlab_path, class: 'btn import_gitlab' do
%i.fa.fa-heart
GitLab.com
- else
= link_to status_import_gitlab_path, class: 'how_to_import_link light btn import_gitlab' do
%i.fa.fa-heart
GitLab.com
= render 'gitlab_import_modal'
2015-03-19 14:06:05 +00:00
2015-08-14 13:56:33 +00:00
- if gitorious_import_enabled?
= link_to new_import_gitorious_path, class: 'btn import_gitorious' do
%i.icon-gitorious.icon-gitorious-small
Gitorious.org
2015-03-19 14:06:05 +00:00
2015-08-14 13:56:33 +00:00
- if google_code_import_enabled?
= link_to new_import_google_code_path, class: 'btn import_google_code' do
%i.fa.fa-google
Google Code
2015-04-03 13:29:27 +00:00
2015-08-04 22:21:12 +00:00
- if fogbugz_import_enabled?
= link_to new_import_fogbugz_path, class: 'btn import_fogbugz' do
%i.fa.fa-bug
Fogbugz
2015-08-14 13:56:33 +00:00
- if git_import_enabled?
= link_to "#", class: 'btn js-toggle-button import_git' do
%i.fa.fa-git
%span Any repo by URL
2015-03-19 14:06:05 +00:00
2015-08-14 13:56:33 +00:00
.js-toggle-content.hide
.form-group.import-url-data
= f.label :import_url, class: 'control-label' do
%span Git repository URL
.col-sm-10
= f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git'
.well.prepend-top-20
%ul
%li
The repository must be accessible over HTTP(S). If it is not publicly accessible, you can add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>.
%li
The import will time out after 4 minutes. For big repositories, use a clone/push combination.
%li
To migrate an SVN repository, check out #{link_to "this document", "http://doc.gitlab.com/ce/workflow/importing/migrating_from_svn.html"}.
2015-01-13 18:34:01 +00:00
2014-12-31 13:07:48 +00:00
%hr.prepend-botton-10
2014-03-11 13:15:08 +00:00
2013-12-30 23:27:02 +00:00
.form-group
2013-12-31 14:01:25 +00:00
= f.label :description, class: 'control-label' do
2013-07-29 18:06:59 +00:00
Description
%span.light (optional)
2013-12-30 23:27:02 +00:00
.col-sm-10
2013-12-31 14:01:25 +00:00
= f.text_area :description, placeholder: "Awesome project", class: "form-control", rows: 3, maxlength: 250, tabindex: 3
2015-04-26 05:01:52 +00:00
= render 'shared/visibility_level', f: f, visibility_level: default_project_visibility, can_change_visibility_level: true, form_model: @project
2013-05-14 09:46:41 +00:00
2013-08-01 13:20:18 +00:00
.form-actions
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4
2013-05-14 09:46:41 +00:00
2013-08-01 13:20:18 +00:00
- if current_user.can_create_group?
.pull-right
2013-12-31 14:01:25 +00:00
.light
2013-08-01 13:20:18 +00:00
Need a group for several dependent projects?
2015-03-14 07:29:32 +00:00
= link_to new_group_path, class: "btn btn-xs" do
2013-08-01 13:20:18 +00:00
Create a group
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.
2015-02-05 18:31:36 +00:00
:coffeescript
2015-03-26 04:45:01 +00:00
$('.how_to_import_link').bind 'click', (e) ->
e.preventDefault()
import_modal = $(this).next(".modal").show()
$('.modal-header .close').bind 'click', ->
$(".modal").hide()