2018-05-04 04:33:29 -04:00
|
|
|
- active_tab = local_assigns.fetch(:active_tab, 'blank')
|
2018-10-03 14:00:22 -04:00
|
|
|
- track_label = local_assigns.fetch(:track_label, 'import_project')
|
2018-05-04 04:33:29 -04:00
|
|
|
|
2018-05-29 14:07:28 -04:00
|
|
|
.project-import
|
|
|
|
.form-group.import-btn-container.clearfix
|
2018-07-02 05:16:24 -04:00
|
|
|
%h5
|
2018-05-29 14:07:28 -04:00
|
|
|
Import project from
|
|
|
|
.import-buttons
|
|
|
|
- if gitlab_project_import_enabled?
|
|
|
|
.import_gitlab_project.has-tooltip{ data: { container: 'body' } }
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit', data: { track_label: "#{track_label}", track_event: "click_button", track_property: "gitlab_export" } do
|
2018-05-29 14:07:28 -04:00
|
|
|
= icon('gitlab', text: 'GitLab export')
|
2018-07-09 06:12:37 -04:00
|
|
|
|
|
|
|
- if github_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to new_import_github_path, class: 'btn js-import-github', data: { track_label: "#{track_label}", track_event: "click_button", track_property: "github" } do
|
2018-05-29 14:07:28 -04:00
|
|
|
= icon('github', text: 'GitHub')
|
2018-07-09 06:12:37 -04:00
|
|
|
|
|
|
|
- if bitbucket_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}",
|
|
|
|
data: { track_label: "#{track_label}", track_event: "click_button", track_property: "bitbucket_cloud" } do
|
2018-06-25 16:06:10 -04:00
|
|
|
= icon('bitbucket', text: 'Bitbucket Cloud')
|
2018-05-29 14:07:28 -04:00
|
|
|
- unless bitbucket_import_configured?
|
|
|
|
= render 'bitbucket_import_modal'
|
2018-07-12 08:21:37 -04:00
|
|
|
- if bitbucket_server_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to status_import_bitbucket_server_path, class: "btn import_bitbucket",
|
|
|
|
data: { track_label: "#{track_label}", track_event: "click_button", track_property: "bitbucket_server" } do
|
2018-07-18 00:32:39 -04:00
|
|
|
= icon('bitbucket-square', text: 'Bitbucket Server')
|
2018-07-12 08:21:37 -04:00
|
|
|
%div
|
2018-07-09 06:12:37 -04:00
|
|
|
- if gitlab_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to status_import_gitlab_path, class: "btn import_gitlab #{'how_to_import_link' unless gitlab_import_configured?}",
|
|
|
|
data: { track_label: "#{track_label}", track_event: "click_button", track_property: "gitlab_com" } do
|
2018-05-29 14:07:28 -04:00
|
|
|
= icon('gitlab', text: 'GitLab.com')
|
|
|
|
- unless gitlab_import_configured?
|
|
|
|
= render 'gitlab_import_modal'
|
2018-07-09 06:12:37 -04:00
|
|
|
|
|
|
|
- if google_code_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to new_import_google_code_path, class: 'btn import_google_code', data: { track_label: "#{track_label}", track_event: "click_button", track_property: "google_code" } do
|
2018-05-29 14:07:28 -04:00
|
|
|
= icon('google', text: 'Google Code')
|
2018-07-09 06:12:37 -04:00
|
|
|
|
|
|
|
- if fogbugz_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to new_import_fogbugz_path, class: 'btn import_fogbugz', data: { track_label: "#{track_label}", track_event: "click_button", track_property: "fogbugz" } do
|
2018-05-29 14:07:28 -04:00
|
|
|
= icon('bug', text: 'Fogbugz')
|
2018-07-09 06:12:37 -04:00
|
|
|
|
|
|
|
- if gitea_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to new_import_gitea_path, class: 'btn import_gitea', data: { track_label: "#{track_label}", track_event: "click_button", track_property: "gitea" } do
|
2018-05-29 14:07:28 -04:00
|
|
|
= custom_icon('go_logo')
|
|
|
|
Gitea
|
2018-07-09 06:12:37 -04:00
|
|
|
|
|
|
|
- if git_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
%button.btn.js-toggle-button.js-import-git-toggle-button{ type: "button", data: { toggle_open_class: 'active', data: { toggle_open_class: 'active', track_label: "#{track_label}" , track_event: "click_button", track_property: "repo_url" } } }
|
2018-05-29 14:07:28 -04:00
|
|
|
= icon('git', text: 'Repo by URL')
|
2018-07-09 06:12:37 -04:00
|
|
|
|
|
|
|
- if manifest_import_enabled?
|
|
|
|
%div
|
2018-10-03 14:00:22 -04:00
|
|
|
= link_to new_import_manifest_path, class: 'btn import_manifest', data: { track_label: "#{track_label}", track_event: "click_button", track_property: "manifest_file" } do
|
2018-07-05 10:30:47 -04:00
|
|
|
= icon('file-text-o', text: 'Manifest file')
|
2018-07-02 05:16:24 -04:00
|
|
|
|
2018-05-29 14:07:28 -04:00
|
|
|
.js-toggle-content.toggle-import-form{ class: ('hide' if active_tab != 'import') }
|
2018-07-02 05:16:24 -04:00
|
|
|
= form_for @project, html: { class: 'new_project' } do |f|
|
|
|
|
%hr
|
2018-05-29 14:07:28 -04:00
|
|
|
= render "shared/import_form", f: f
|
2018-10-03 14:00:22 -04:00
|
|
|
= render 'new_project_fields', f: f, project_name_id: "import-url-name", hide_init_with_readme: true, track_label: track_label
|