Commit ad5b9695 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '39028-repo-by-url-fields' into 'master'

Add project fields to import project by url

Closes #39028

See merge request gitlab-org/gitlab-ce!14822
parents c12a1d84 457b135e
...@@ -634,10 +634,14 @@ a.deploy-project-label { ...@@ -634,10 +634,14 @@ a.deploy-project-label {
} }
.project-import { .project-import {
.form-group { .import-btn-container {
margin-bottom: 0; margin-bottom: 0;
} }
.toggle-import-form {
padding-bottom: 10px;
}
.import-buttons { .import-buttons {
padding-left: 0; padding-left: 0;
display: -webkit-flex; display: -webkit-flex;
......
...@@ -48,52 +48,54 @@ ...@@ -48,52 +48,54 @@
.tab-pane.import-project-pane{ id: 'import-project-pane', role: 'tabpanel' } .tab-pane.import-project-pane{ id: 'import-project-pane', role: 'tabpanel' }
= form_for @project, html: { class: 'new_project' } do |f| = form_for @project, html: { class: 'new_project' } do |f|
- if import_sources_enabled? - if import_sources_enabled?
.project-import .project-import.row
.form-group.clearfix .col-sm-12
= f.label :visibility_level, class: 'label-light' do #the label here seems wrong .form-group.import-btn-container.clearfix
Import project from = f.label :visibility_level, class: 'label-light' do #the label here seems wrong
.col-sm-12.import-buttons Import project from
%div .import-buttons
- if github_import_enabled? %div
= link_to new_import_github_path, class: 'btn import_github' do - if github_import_enabled?
= icon('github', text: 'GitHub') = link_to new_import_github_path, class: 'btn import_github' do
%div = icon('github', text: 'GitHub')
- if bitbucket_import_enabled? %div
= link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}" do - if bitbucket_import_enabled?
= icon('bitbucket', text: 'Bitbucket') = link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}" do
- unless bitbucket_import_configured? = icon('bitbucket', text: 'Bitbucket')
= render 'bitbucket_import_modal' - unless bitbucket_import_configured?
%div = render 'bitbucket_import_modal'
- if gitlab_import_enabled? %div
= link_to status_import_gitlab_path, class: "btn import_gitlab #{'how_to_import_link' unless gitlab_import_configured?}" do - if gitlab_import_enabled?
= icon('gitlab', text: 'GitLab.com') = link_to status_import_gitlab_path, class: "btn import_gitlab #{'how_to_import_link' unless gitlab_import_configured?}" do
- unless gitlab_import_configured? = icon('gitlab', text: 'GitLab.com')
= render 'gitlab_import_modal' - unless gitlab_import_configured?
%div = render 'gitlab_import_modal'
- if google_code_import_enabled? %div
= link_to new_import_google_code_path, class: 'btn import_google_code' do - if google_code_import_enabled?
= icon('google', text: 'Google Code') = link_to new_import_google_code_path, class: 'btn import_google_code' do
%div = icon('google', text: 'Google Code')
- if fogbugz_import_enabled? %div
= link_to new_import_fogbugz_path, class: 'btn import_fogbugz' do - if fogbugz_import_enabled?
= icon('bug', text: 'Fogbugz') = link_to new_import_fogbugz_path, class: 'btn import_fogbugz' do
%div = icon('bug', text: 'Fogbugz')
- if gitea_import_enabled? %div
= link_to new_import_gitea_url, class: 'btn import_gitea' do - if gitea_import_enabled?
= custom_icon('go_logo') = link_to new_import_gitea_url, class: 'btn import_gitea' do
Gitea = custom_icon('go_logo')
%div Gitea
- if git_import_enabled? %div
%button.btn.js-toggle-button.import_git{ type: "button" } - if git_import_enabled?
= icon('git', text: 'Repo by URL') %button.btn.js-toggle-button.import_git{ type: "button" }
- if gitlab_project_import_enabled? = icon('git', text: 'Repo by URL')
.import_gitlab_project.has-tooltip{ data: { container: 'body' } } - if gitlab_project_import_enabled?
= link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit' do .import_gitlab_project.has-tooltip{ data: { container: 'body' } }
= icon('gitlab', text: 'GitLab export') = link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit' do
.col-lg-12 = icon('gitlab', text: 'GitLab export')
.js-toggle-content.hide .col-lg-12
%hr .js-toggle-content.hide.toggle-import-form
= render "shared/import_form", f: f %hr
= render "shared/import_form", f: f
= render 'new_project_fields', f: f, project_name_id: "import-url-name"
.save-project-loader.hide .save-project-loader.hide
.center .center
......
...@@ -25,9 +25,9 @@ module Gitlab ...@@ -25,9 +25,9 @@ module Gitlab
end end
TEMPLATES_TABLE = [ TEMPLATES_TABLE = [
ProjectTemplate.new('rails', 'Ruby on Rails', 'Includes a MVC structure, gemfile, rakefile, and .gitlab-ci.yml file, along with many others, to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/rails'), ProjectTemplate.new('rails', 'Ruby on Rails', 'Includes an MVC structure, gemfile, rakefile, and .gitlab-ci.yml file, along with many others, to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/rails'),
ProjectTemplate.new('spring', 'Spring', 'Includes a MVC structure, mvnw, pom.xml, and .gitlab-ci.yml file to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/spring'), ProjectTemplate.new('spring', 'Spring', 'Includes an MVC structure, mvnw, pom.xml, and .gitlab-ci.yml file to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/spring'),
ProjectTemplate.new('express', 'NodeJS Express', 'Includes a MVC structure, and .gitlab-ci.yml file to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/express') ProjectTemplate.new('express', 'NodeJS Express', 'Includes an MVC structure and .gitlab-ci.yml file to help you get started.', 'https://gitlab.com/gitlab-org/project-templates/express')
].freeze ].freeze
class << self class << self
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment