debian-mirror-gitlab/app/views/projects/_import_project_pane.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

88 lines
5.2 KiB
Text
Raw Normal View History

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')
2022-06-21 17:19:12 +05:30
- namespace_id = local_assigns.fetch(:destination_namespace_id, nil)
2018-10-15 14:42:47 +05:30
2018-11-08 19:23:39 +05:30
.project-import
.form-group.import-btn-container.clearfix
2022-06-21 17:19:12 +05:30
%h5.gl-display-flex
2021-01-03 14:25:43 +05:30
= _("Import project from")
2022-06-21 17:19:12 +05:30
= link_to _('History'), import_history_index_path, class: 'gl-link gl-ml-auto gl-font-weight-normal'
2018-11-08 19:23:39 +05:30
.import-buttons
- if gitlab_project_import_enabled?
2021-09-30 23:02:18 +05:30
.import_gitlab_project.has-tooltip{ data: { container: 'body', qa_selector: 'gitlab_import_button' } }
2022-05-07 20:08:51 +05:30
= 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
2021-02-22 17:27:13 +05:30
.gl-button-icon
= sprite_icon('tanuki')
2020-07-28 23:09:34 +05:30
= _("GitLab export")
2018-11-18 11:00:15 +05:30
- if github_import_enabled?
%div
2022-06-21 17:19:12 +05:30
= link_to new_import_github_path(namespace_id: namespace_id), 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
2021-02-22 17:27:13 +05:30
.gl-button-icon
= sprite_icon('github')
2021-01-03 14:25:43 +05:30
GitHub
2018-11-18 11:00:15 +05:30
- if bitbucket_import_enabled?
%div
2022-08-13 15:12:31 +05:30
= link_to status_import_bitbucket_path(namespace_id: namespace_id), class: "gl-button btn-default btn import_bitbucket js-import-project-btn #{'js-how-to-import-link' unless bitbucket_import_configured?}",
2022-04-04 11:22:00 +05:30
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
2021-02-22 17:27:13 +05:30
.gl-button-icon
= sprite_icon('bitbucket')
2021-01-03 14:25:43 +05:30
Bitbucket Cloud
2018-11-18 11:00:15 +05:30
- if bitbucket_server_import_enabled?
%div
2022-08-13 15:12:31 +05:30
= link_to status_import_bitbucket_server_path(namespace_id: namespace_id), 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
2021-02-22 17:27:13 +05:30
.gl-button-icon
= sprite_icon('bitbucket')
2021-01-03 14:25:43 +05:30
Bitbucket Server
2018-11-18 11:00:15 +05:30
%div
- if gitlab_import_enabled?
%div
2022-08-13 15:12:31 +05:30
= link_to status_import_gitlab_path(namespace_id: namespace_id), class: "gl-button btn-default btn import_gitlab js-import-project-btn #{'js-how-to-import-link' unless gitlab_import_configured?}",
2022-05-07 20:08:51 +05:30
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
2021-02-22 17:27:13 +05:30
.gl-button-icon
= sprite_icon('tanuki')
2020-07-28 23:09:34 +05:30
= _("GitLab.com")
2018-11-18 11:00:15 +05:30
- if fogbugz_import_enabled?
%div
2022-08-13 15:12:31 +05:30
= link_to new_import_fogbugz_path(namespace_id: namespace_id), class: 'gl-button btn-default btn import_fogbugz js-import-project-btn', data: { platform: 'fogbugz', **tracking_attrs_data(track_label, 'click_button', 'fogbugz') } do
2021-02-22 17:27:13 +05:30
.gl-button-icon
= sprite_icon('bug')
2020-11-24 15:15:51 +05:30
FogBugz
2018-11-18 11:00:15 +05:30
- if gitea_import_enabled?
%div
2022-07-23 23:45:48 +05:30
= link_to new_import_gitea_path(namespace_id: namespace_id), class: 'gl-button btn-default btn import_gitea js-import-project-btn', data: { platform: 'gitea', **tracking_attrs_data(track_label, 'click_button', 'gitea') } do
2021-02-22 17:27:13 +05:30
.gl-button-icon
= 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
2022-03-02 08:16:31 +05:30
%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') } }
2021-02-22 17:27:13 +05:30
.gl-button-icon
= sprite_icon('link', css_class: 'gl-icon')
2022-07-23 23:45:48 +05:30
= _('Repository by URL')
2018-11-18 11:00:15 +05:30
- if manifest_import_enabled?
%div
2022-07-23 23:45:48 +05:30
= link_to new_import_manifest_path(namespace_id: namespace_id), 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
2021-02-22 17:27:13 +05:30
.gl-button-icon
= sprite_icon('doc-text')
2021-01-03 14:25:43 +05:30
Manifest file
2018-11-18 11:00:15 +05:30
2019-09-04 21:01:54 +05:30
- if phabricator_import_enabled?
%div
2022-07-23 23:45:48 +05:30
= link_to new_import_phabricator_path(namespace_id: namespace_id), 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
2021-02-22 17:27:13 +05:30
.gl-button-icon
= custom_icon('issues')
2019-09-04 21:01:54 +05:30
= _("Phabricator Tasks")
2018-11-08 19:23:39 +05:30
.js-toggle-content.toggle-import-form{ class: ('hide' if active_tab != 'import') }
2022-06-21 17:19:12 +05:30
= gitlab_ui_form_for @project, html: { class: 'new_project gl-show-field-errors js-project-import' } do |f|
2018-11-18 11:00:15 +05:30
%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