2018-10-15 14:42:47 +05:30
|
|
|
- active_tab = local_assigns.fetch(:active_tab, 'blank')
|
2018-12-05 23:21:45 +05:30
|
|
|
- track_label = local_assigns.fetch(:track_label, 'import_project')
|
2018-10-15 14:42:47 +05:30
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
.project-import
|
|
|
|
.form-group.import-btn-container.clearfix
|
2018-11-18 11:00:15 +05:30
|
|
|
%h5
|
2021-01-03 14:25:43 +05:30
|
|
|
= _("Import project from")
|
2018-11-08 19:23:39 +05:30
|
|
|
.import-buttons
|
|
|
|
- if gitlab_project_import_enabled?
|
|
|
|
.import_gitlab_project.has-tooltip{ data: { container: 'body' } }
|
2019-09-04 21:01:54 +05:30
|
|
|
= link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit', **tracking_attrs(track_label, 'click_button', 'gitlab_export') do
|
2020-07-28 23:09:34 +05:30
|
|
|
= sprite_icon('tanuki')
|
|
|
|
= _("GitLab export")
|
2018-11-18 11:00:15 +05:30
|
|
|
|
|
|
|
- if github_import_enabled?
|
|
|
|
%div
|
2019-09-04 21:01:54 +05:30
|
|
|
= link_to new_import_github_path, class: 'btn js-import-github', **tracking_attrs(track_label, 'click_button', 'github') do
|
2021-01-03 14:25:43 +05:30
|
|
|
= sprite_icon('github')
|
|
|
|
GitHub
|
2018-11-18 11:00:15 +05:30
|
|
|
|
|
|
|
- if bitbucket_import_enabled?
|
|
|
|
%div
|
2018-12-05 23:21:45 +05:30
|
|
|
= link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}",
|
2019-09-04 21:01:54 +05:30
|
|
|
**tracking_attrs(track_label, 'click_button', 'bitbucket_cloud') do
|
2021-01-03 14:25:43 +05:30
|
|
|
= sprite_icon('bitbucket')
|
|
|
|
Bitbucket Cloud
|
2018-11-08 19:23:39 +05:30
|
|
|
- unless bitbucket_import_configured?
|
2020-06-23 00:09:42 +05:30
|
|
|
= render 'projects/bitbucket_import_modal'
|
2018-11-18 11:00:15 +05:30
|
|
|
- if bitbucket_server_import_enabled?
|
|
|
|
%div
|
2019-09-04 21:01:54 +05:30
|
|
|
= link_to status_import_bitbucket_server_path, class: "btn import_bitbucket", **tracking_attrs(track_label, 'click_button', 'bitbucket_server') do
|
2021-01-03 14:25:43 +05:30
|
|
|
= sprite_icon('bitbucket')
|
|
|
|
Bitbucket Server
|
2018-11-18 11:00:15 +05:30
|
|
|
%div
|
|
|
|
- if gitlab_import_enabled?
|
|
|
|
%div
|
2018-12-05 23:21:45 +05:30
|
|
|
= link_to status_import_gitlab_path, class: "btn import_gitlab #{'how_to_import_link' unless gitlab_import_configured?}",
|
2019-09-04 21:01:54 +05:30
|
|
|
**tracking_attrs(track_label, 'click_button', 'gitlab_com') do
|
2020-07-28 23:09:34 +05:30
|
|
|
= sprite_icon('tanuki')
|
|
|
|
= _("GitLab.com")
|
2018-11-08 19:23:39 +05:30
|
|
|
- unless gitlab_import_configured?
|
2020-06-23 00:09:42 +05:30
|
|
|
= render 'projects/gitlab_import_modal'
|
2018-11-18 11:00:15 +05:30
|
|
|
|
|
|
|
- if google_code_import_enabled?
|
|
|
|
%div
|
2019-09-04 21:01:54 +05:30
|
|
|
= link_to new_import_google_code_path, class: 'btn import_google_code', **tracking_attrs(track_label, 'click_button', 'google_code') do
|
2021-01-03 14:25:43 +05:30
|
|
|
= sprite_icon('google')
|
|
|
|
Google Code
|
2018-11-18 11:00:15 +05:30
|
|
|
|
|
|
|
- if fogbugz_import_enabled?
|
|
|
|
%div
|
2019-09-04 21:01:54 +05:30
|
|
|
= link_to new_import_fogbugz_path, class: 'btn import_fogbugz', **tracking_attrs(track_label, 'click_button', 'fogbugz') do
|
2020-11-24 15:15:51 +05:30
|
|
|
= sprite_icon('bug')
|
|
|
|
FogBugz
|
2018-11-18 11:00:15 +05:30
|
|
|
|
|
|
|
- if gitea_import_enabled?
|
|
|
|
%div
|
2019-09-04 21:01:54 +05:30
|
|
|
= link_to new_import_gitea_path, class: 'btn import_gitea', **tracking_attrs(track_label, 'click_button', 'gitea') do
|
2019-07-31 22:56:46 +05:30
|
|
|
= custom_icon('gitea_logo')
|
2018-11-08 19:23:39 +05:30
|
|
|
Gitea
|
2018-11-18 11:00:15 +05:30
|
|
|
|
|
|
|
- if git_import_enabled?
|
|
|
|
%div
|
2020-10-24 23:57:45 +05:30
|
|
|
%button.btn.btn-svg.js-toggle-button.js-import-git-toggle-button{ type: "button", data: { toggle_open_class: 'active' }, **tracking_attrs(track_label, 'click_button', 'repo_url') }
|
|
|
|
= sprite_icon('link', css_class: 'gl-icon')
|
|
|
|
= _('Repo by URL')
|
2018-11-18 11:00:15 +05:30
|
|
|
|
|
|
|
- if manifest_import_enabled?
|
|
|
|
%div
|
2019-09-04 21:01:54 +05:30
|
|
|
= link_to new_import_manifest_path, class: 'btn import_manifest', **tracking_attrs(track_label, 'click_button', 'manifest_file') do
|
2021-01-03 14:25:43 +05:30
|
|
|
= sprite_icon('doc-text')
|
|
|
|
Manifest file
|
2018-11-18 11:00:15 +05:30
|
|
|
|
2019-09-04 21:01:54 +05:30
|
|
|
- if phabricator_import_enabled?
|
|
|
|
%div
|
|
|
|
= link_to new_import_phabricator_path, class: 'btn import_phabricator', data: { track_label: "#{track_label}", track_event: "click_button", track_property: "phabricator" } do
|
|
|
|
= custom_icon('issues')
|
|
|
|
= _("Phabricator Tasks")
|
|
|
|
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
.js-toggle-content.toggle-import-form{ class: ('hide' if active_tab != 'import') }
|
2018-11-18 11:00:15 +05:30
|
|
|
= form_for @project, html: { class: 'new_project' } do |f|
|
|
|
|
%hr
|
2018-11-08 19:23:39 +05:30
|
|
|
= render "shared/import_form", f: f
|
2020-06-23 00:09:42 +05:30
|
|
|
= render 'projects/new_project_fields', f: f, project_name_id: "import-url-name", hide_init_with_readme: true, track_label: track_label
|