2018-05-04 08:33:29 +00:00
|
|
|
- active_tab = local_assigns.fetch(:active_tab, 'blank')
|
2018-10-03 18:00:22 +00:00
|
|
|
- track_label = local_assigns.fetch(:track_label, 'import_project')
|
2018-05-04 08:33:29 +00:00
|
|
|
|
2018-05-29 18:07:28 +00:00
|
|
|
.project-import
|
|
|
|
.form-group.import-btn-container.clearfix
|
2018-07-02 09:16:24 +00:00
|
|
|
%h5
|
2020-10-12 09:08:38 +00:00
|
|
|
= _("Import project from")
|
2018-05-29 18:07:28 +00:00
|
|
|
.import-buttons
|
|
|
|
- if gitlab_project_import_enabled?
|
2021-06-23 21:08:33 +00:00
|
|
|
.import_gitlab_project.has-tooltip{ data: { container: 'body', qa_selector: 'gitlab_import_button' } }
|
2022-02-28 12:15:45 +00:00
|
|
|
= link_to '#', class: 'gl-button btn-default btn btn_import_gitlab_project js-import-project-btn', data: { href: new_import_gitlab_project_path, platform: 'gitlab_export', **tracking_attrs_data(track_label, 'click_button', 'gitlab_export') } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= sprite_icon('tanuki')
|
2020-07-06 18:09:13 +00:00
|
|
|
= _("GitLab export")
|
2018-07-09 10:12:37 +00:00
|
|
|
|
|
|
|
- if github_import_enabled?
|
|
|
|
%div
|
2021-12-22 06:13:39 +00:00
|
|
|
= link_to new_import_github_path, class: 'gl-button btn-default btn js-import-github js-import-project-btn', data: { platform: 'github', **tracking_attrs_data(track_label, 'click_button', 'github') } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= sprite_icon('github')
|
2020-10-20 09:08:43 +00:00
|
|
|
GitHub
|
2018-07-09 10:12:37 +00:00
|
|
|
|
|
|
|
- if bitbucket_import_enabled?
|
|
|
|
%div
|
2022-02-16 06:12:24 +00:00
|
|
|
= link_to status_import_bitbucket_path, class: "gl-button btn-default btn import_bitbucket js-import-project-btn #{'js-how-to-import-link' unless bitbucket_import_configured?}",
|
|
|
|
data: { modal_title: _("Import projects from Bitbucket"), modal_message: import_from_bitbucket_message, platform: 'bitbucket_cloud', **tracking_attrs_data(track_label, 'click_button', 'bitbucket_cloud') } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= sprite_icon('bitbucket')
|
2020-10-19 09:08:58 +00:00
|
|
|
Bitbucket Cloud
|
2018-07-12 12:21:37 +00:00
|
|
|
- if bitbucket_server_import_enabled?
|
|
|
|
%div
|
2021-12-22 06:13:39 +00:00
|
|
|
= link_to status_import_bitbucket_server_path, class: "gl-button btn-default btn import_bitbucket js-import-project-btn", data: { platform: 'bitbucket_server', **tracking_attrs_data(track_label, 'click_button', 'bitbucket_server') } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= sprite_icon('bitbucket')
|
2020-10-19 09:08:58 +00:00
|
|
|
Bitbucket Server
|
2018-07-12 12:21:37 +00:00
|
|
|
%div
|
2018-07-09 10:12:37 +00:00
|
|
|
- if gitlab_import_enabled?
|
|
|
|
%div
|
2022-02-23 18:16:59 +00:00
|
|
|
= link_to status_import_gitlab_path, class: "gl-button btn-default btn import_gitlab js-import-project-btn #{'js-how-to-import-link' unless gitlab_import_configured?}",
|
|
|
|
data: { modal_title: _("Import projects from GitLab.com"), modal_message: import_from_gitlab_message, platform: 'gitlab_com', **tracking_attrs_data(track_label, 'click_button', 'gitlab_com') } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= sprite_icon('tanuki')
|
2020-07-06 18:09:13 +00:00
|
|
|
= _("GitLab.com")
|
2018-07-09 10:12:37 +00:00
|
|
|
|
|
|
|
- if fogbugz_import_enabled?
|
|
|
|
%div
|
2021-12-22 06:13:39 +00:00
|
|
|
= link_to new_import_fogbugz_path, class: 'gl-button btn-default btn import_fogbugz js-import-project-btn', data: { platform: 'fogbugz', **tracking_attrs_data(track_label, 'click_button', 'fogbugz') } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= sprite_icon('bug')
|
2020-08-25 15:10:17 +00:00
|
|
|
FogBugz
|
2018-07-09 10:12:37 +00:00
|
|
|
|
|
|
|
- if gitea_import_enabled?
|
|
|
|
%div
|
2021-12-22 06:13:39 +00:00
|
|
|
= link_to new_import_gitea_path, class: 'gl-button btn-default btn import_gitea js-import-project-btn', data: { platform: 'gitea', **tracking_attrs_data(track_label, 'click_button', 'gitea') } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= custom_icon('gitea_logo')
|
2018-05-29 18:07:28 +00:00
|
|
|
Gitea
|
2018-07-09 10:12:37 +00:00
|
|
|
|
|
|
|
- if git_import_enabled?
|
|
|
|
%div
|
2021-12-22 06:13:39 +00:00
|
|
|
%button.gl-button.btn-default.btn.btn-svg.js-toggle-button.js-import-git-toggle-button.js-import-project-btn{ type: "button", data: { platform: 'repo_url', toggle_open_class: 'active', **tracking_attrs_data(track_label, 'click_button', 'repo_url') } }
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= sprite_icon('link', css_class: 'gl-icon')
|
2020-07-30 15:09:40 +00:00
|
|
|
= _('Repo by URL')
|
2018-07-09 10:12:37 +00:00
|
|
|
|
|
|
|
- if manifest_import_enabled?
|
|
|
|
%div
|
2021-12-22 06:13:39 +00:00
|
|
|
= link_to new_import_manifest_path, class: 'gl-button btn-default btn import_manifest js-import-project-btn', data: { platform: 'manifest_file', **tracking_attrs_data(track_label, 'click_button', 'manifest_file') } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= sprite_icon('doc-text')
|
2020-10-12 09:08:38 +00:00
|
|
|
Manifest file
|
2018-07-02 09:16:24 +00:00
|
|
|
|
2019-04-23 14:27:01 +00:00
|
|
|
- if phabricator_import_enabled?
|
|
|
|
%div
|
2021-12-22 06:13:39 +00:00
|
|
|
= link_to new_import_phabricator_path, class: 'gl-button btn-default btn import_phabricator js-import-project-btn', data: { platform: 'phabricator', track_label: "#{track_label}", track_action: "click_button", track_property: "phabricator" } do
|
2020-12-14 18:09:48 +00:00
|
|
|
.gl-button-icon
|
|
|
|
= custom_icon('issues')
|
2019-04-23 14:27:01 +00:00
|
|
|
= _("Phabricator Tasks")
|
|
|
|
|
|
|
|
|
2018-05-29 18:07:28 +00:00
|
|
|
.js-toggle-content.toggle-import-form{ class: ('hide' if active_tab != 'import') }
|
2022-01-26 21:16:58 +00:00
|
|
|
= form_for @project, html: { class: 'new_project gl-show-field-errors js-project-import' } do |f|
|
2018-07-02 09:16:24 +00:00
|
|
|
%hr
|
2018-05-29 18:07:28 +00:00
|
|
|
= render "shared/import_form", f: f
|
2020-05-29 12:08:19 +00:00
|
|
|
= render 'projects/new_project_fields', f: f, project_name_id: "import-url-name", hide_init_with_readme: true, track_label: track_label
|