2015-09-11 14:41:01 +05:30
|
|
|
- page_title 'New Project'
|
|
|
|
- header_title 'New Project'
|
2014-09-02 18:07:02 +05:30
|
|
|
.project-edit-container
|
|
|
|
.project-edit-errors
|
|
|
|
= render 'projects/errors'
|
|
|
|
.project-edit-content
|
|
|
|
|
2015-09-11 14:41:01 +05:30
|
|
|
= form_for @project, html: { class: 'new_project form-horizontal js-requires-input' } do |f|
|
2014-09-02 18:07:02 +05:30
|
|
|
.form-group.project-name-holder
|
2015-04-26 12:48:37 +05:30
|
|
|
= f.label :path, class: 'control-label' do
|
2015-10-24 18:46:33 +05:30
|
|
|
Project path
|
2014-09-02 18:07:02 +05:30
|
|
|
.col-sm-10
|
2015-04-26 12:48:37 +05:30
|
|
|
.input-group
|
2015-09-11 14:41:01 +05:30
|
|
|
= f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 1, autofocus: true, required: true
|
2015-04-26 12:48:37 +05:30
|
|
|
.input-group-addon
|
|
|
|
\.git
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
- 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}
|
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
- if import_sources_enabled?
|
|
|
|
.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
|
2015-10-24 18:46:33 +05:30
|
|
|
= link_to '#', class: 'how_to_import_link btn import_github' do
|
2015-09-25 12:07:36 +05:30
|
|
|
%i.fa.fa-github
|
|
|
|
GitHub
|
|
|
|
= render 'github_import_modal'
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
- 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
|
2015-10-24 18:46:33 +05:30
|
|
|
= link_to status_import_bitbucket_path, class: 'how_to_import_link btn import_bitbucket', "data-no-turbolink" => "true" do
|
2015-09-25 12:07:36 +05:30
|
|
|
%i.fa.fa-bitbucket
|
|
|
|
Bitbucket
|
|
|
|
= render 'bitbucket_import_modal'
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
- if gitlab_import_enabled?
|
2015-09-25 12:07:36 +05:30
|
|
|
- if gitlab_import_configured?
|
|
|
|
= link_to status_import_gitlab_path, class: 'btn import_gitlab' do
|
|
|
|
%i.fa.fa-heart
|
|
|
|
GitLab.com
|
|
|
|
- else
|
2015-10-24 18:46:33 +05:30
|
|
|
= link_to status_import_gitlab_path, class: 'how_to_import_link btn import_gitlab' do
|
2015-09-25 12:07:36 +05:30
|
|
|
%i.fa.fa-heart
|
|
|
|
GitLab.com
|
|
|
|
= render 'gitlab_import_modal'
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
- if gitorious_import_enabled?
|
|
|
|
= link_to new_import_gitorious_path, class: 'btn import_gitorious' do
|
|
|
|
%i.icon-gitorious.icon-gitorious-small
|
|
|
|
Gitorious.org
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
- 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-26 12:48:37 +05:30
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
- if fogbugz_import_enabled?
|
|
|
|
= link_to new_import_fogbugz_path, class: 'btn import_fogbugz' do
|
|
|
|
%i.fa.fa-bug
|
|
|
|
Fogbugz
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
- if git_import_enabled?
|
|
|
|
= link_to "#", class: 'btn js-toggle-button import_git' do
|
|
|
|
%i.fa.fa-git
|
|
|
|
%span Any repo by URL
|
|
|
|
|
|
|
|
.js-toggle-content.hide
|
2015-11-26 14:37:03 +05:30
|
|
|
= render "shared/import_form", f: f
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2015-10-24 18:46:33 +05:30
|
|
|
.prepend-botton-10
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
.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
|
2015-09-11 14:41:01 +05:30
|
|
|
= render 'shared/visibility_level', f: f, visibility_level: default_project_visibility, can_change_visibility_level: true, form_model: @project
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
.form-actions
|
|
|
|
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4
|
|
|
|
|
|
|
|
- if current_user.can_create_group?
|
|
|
|
.pull-right
|
2015-10-24 18:46:33 +05:30
|
|
|
.light.inline
|
|
|
|
.space-right
|
|
|
|
Need a group for several dependent projects?
|
|
|
|
= link_to new_group_path, class: "btn" do
|
|
|
|
Create a group
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
.save-project-loader.hide
|
|
|
|
.center
|
|
|
|
%h2
|
2015-04-26 12:48:37 +05:30
|
|
|
%i.fa.fa-spinner.fa-spin
|
2014-09-02 18:07:02 +05:30
|
|
|
Creating project & repository.
|
|
|
|
%p Please wait a moment, this page will automatically refresh when ready.
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2015-11-26 14:37:03 +05:30
|
|
|
:javascript
|
|
|
|
$('.how_to_import_link').bind('click', function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
var import_modal = $(this).next(".modal").show();
|
|
|
|
});
|
|
|
|
$('.modal-header .close').bind('click', function() {
|
|
|
|
$(".modal").hide();
|
|
|
|
});
|