gitlab-org--gitlab-foss/app/views/projects/new.html.haml

117 lines
4.4 KiB
Text
Raw Normal View History

2013-08-12 10:21:57 -04:00
.project-edit-container
.project-edit-errors
= render 'projects/errors'
.project-edit-content
= form_for @project, html: { class: 'new_project form-horizontal' } do |f|
.form-group.project-name-holder
= f.label :path, class: 'control-label' do
%strong Project path
.col-sm-10
.input-group
= f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 1, autofocus: true
.input-group-addon
\.git
- if current_user.can_select_namespace?
.form-group
= f.label :namespace_id, class: 'control-label' do
%span Namespace
.col-sm-10
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'select2', tabindex: 2}
%hr
.project-import.js-toggle-container
.form-group
%label.control-label Import project from
.col-sm-10
- if github_import_enabled?
= link_to status_import_github_path, class: 'btn' do
%i.fa.fa-github
GitHub
- else
= link_to '#', class: 'how_to_import_link light btn' do
%i.fa.fa-github
GitHub
= render 'github_import_modal'
- if bitbucket_import_enabled?
= link_to status_import_bitbucket_path, class: 'btn' do
%i.fa.fa-bitbucket
Bitbucket
- else
= link_to '#', class: 'how_to_import_link light btn' do
%i.fa.fa-bitbucket
Bitbucket
= render 'bitbucket_import_modal'
- unless request.host == 'gitlab.com'
- if gitlab_import_enabled?
= link_to status_import_gitlab_path, class: 'btn' do
%i.fa.fa-heart
GitLab.com
- else
= link_to '#', class: 'how_to_import_link light btn' do
%i.fa.fa-heart
GitLab.com
= render 'gitlab_import_modal'
= link_to new_import_gitorious_path, class: 'btn' do
%i.icon-gitorious.icon-gitorious-small
Gitorious.org
= link_to "#", class: 'btn js-toggle-button' do
%i.fa.fa-git
2015-03-19 10:43:49 -04:00
%span Any repo by URL
.js-toggle-content.hide
.form-group.import-url-data
= f.label :import_url, class: 'control-label' do
%span Git repository URL
.col-sm-10
2015-03-19 10:43:49 -04:00
= f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git'
.well.prepend-top-20
2015-03-19 10:43:49 -04:00
%ul
%li
2015-03-19 10:43:49 -04:00
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
2015-03-19 10:43:49 -04:00
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/migrating_from_svn.html"}.
2015-01-13 13:34:01 -05:00
2014-12-31 08:07:48 -05:00
%hr.prepend-botton-10
.form-group
= f.label :description, class: 'control-label' do
Description
%span.light (optional)
.col-sm-10
= f.text_area :description, placeholder: "Awesome project", class: "form-control", rows: 3, maxlength: 250, tabindex: 3
= render "visibility_level", f: f, visibility_level: gitlab_config.default_projects_features.visibility_level, can_change_visibility_level: true
2013-08-01 09:20:18 -04:00
.form-actions
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4
2013-08-01 09:20:18 -04:00
- if current_user.can_create_group?
.pull-right
.light
2013-08-01 09:20:18 -04:00
Need a group for several dependent projects?
2015-03-14 03:29:32 -04:00
= link_to new_group_path, class: "btn btn-xs" do
2013-08-01 09:20:18 -04:00
Create a group
.save-project-loader.hide
.center
%h2
2014-10-01 18:21:29 -04:00
%i.fa.fa-spinner.fa-spin
Creating project &amp; repository.
2013-08-12 10:21:57 -04:00
%p Please wait a moment, this page will automatically refresh when ready.
2015-02-05 13:31:36 -05:00
:coffeescript
$('.how_to_import_link').bind 'click', (e) ->
e.preventDefault()
import_modal = $(this).next(".modal").show()
$('.modal-header .close').bind 'click', ->
$(".modal").hide()