2019-02-15 15:39:39 +05:30
|
|
|
- project = project || @project
|
2020-03-13 15:44:24 +05:30
|
|
|
- dropdown_class = local_assigns.fetch(:dropdown_class, '')
|
2019-02-15 15:39:39 +05:30
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
.git-clone-holder.js-git-clone-holder
|
2022-11-25 23:54:43 +05:30
|
|
|
%a#clone-dropdown.gl-button.btn.btn-confirm.clone-dropdown-btn{ href: '#', data: { toggle: 'dropdown', qa_selector: 'clone_dropdown' } }
|
2020-07-28 23:09:34 +05:30
|
|
|
%span.gl-mr-2.js-clone-dropdown-label
|
2019-02-15 15:39:39 +05:30
|
|
|
= _('Clone')
|
2020-03-13 15:44:24 +05:30
|
|
|
= sprite_icon("chevron-down", css_class: "icon")
|
2022-11-25 23:54:43 +05:30
|
|
|
%ul.dropdown-menu.dropdown-menu-large.dropdown-menu-selectable.clone-options-dropdown{ class: dropdown_class, data: { qa_selector: 'clone_dropdown_content' } }
|
2019-02-15 15:39:39 +05:30
|
|
|
- if ssh_enabled?
|
2021-03-11 19:13:27 +05:30
|
|
|
%li{ class: 'gl-px-4!' }
|
2019-02-15 15:39:39 +05:30
|
|
|
%label.label-bold
|
|
|
|
= _('Clone with SSH')
|
2021-04-17 20:07:23 +05:30
|
|
|
.input-group.btn-group
|
2022-11-25 23:54:43 +05:30
|
|
|
= text_field_tag :ssh_project_clone, project.ssh_url_to_repo, class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'ssh_clone_url_content' }
|
2019-02-15 15:39:39 +05:30
|
|
|
.input-group-append
|
2021-04-17 20:07:23 +05:30
|
|
|
= clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default")
|
2019-02-15 15:39:39 +05:30
|
|
|
= render_if_exists 'projects/buttons/geo'
|
|
|
|
- if http_enabled?
|
2021-03-11 19:13:27 +05:30
|
|
|
%li.pt-2{ class: 'gl-px-4!' }
|
2019-02-15 15:39:39 +05:30
|
|
|
%label.label-bold
|
|
|
|
= _('Clone with %{http_label}') % { http_label: gitlab_config.protocol.upcase }
|
2021-04-17 20:07:23 +05:30
|
|
|
.input-group.btn-group
|
2022-11-25 23:54:43 +05:30
|
|
|
= text_field_tag :http_project_clone, project.http_url_to_repo, class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'http_clone_url_content' }
|
2019-02-15 15:39:39 +05:30
|
|
|
.input-group-append
|
2021-04-17 20:07:23 +05:30
|
|
|
= clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default")
|
2019-02-15 15:39:39 +05:30
|
|
|
= render_if_exists 'projects/buttons/geo'
|
2022-10-11 01:57:18 +05:30
|
|
|
= render_if_exists 'projects/buttons/kerberos_clone_field'
|
|
|
|
%li.divider.mt-2
|
2021-09-04 01:27:46 +05:30
|
|
|
%li.pt-2.gl-new-dropdown-item
|
|
|
|
%label.label-bold{ class: 'gl-px-4!' }
|
|
|
|
= _('Open in your IDE')
|
|
|
|
- if ssh_enabled?
|
2022-07-16 23:28:13 +05:30
|
|
|
- escaped_ssh_url_to_repo = CGI.escape(project.ssh_url_to_repo)
|
|
|
|
%a.dropdown-item.open-with-link{ href: 'vscode://vscode.git/clone?url=' + escaped_ssh_url_to_repo }
|
2021-09-04 01:27:46 +05:30
|
|
|
.gl-new-dropdown-item-text-wrapper
|
|
|
|
= _('Visual Studio Code (SSH)')
|
|
|
|
- if http_enabled?
|
2022-07-16 23:28:13 +05:30
|
|
|
- escaped_http_url_to_repo = CGI.escape(project.http_url_to_repo)
|
|
|
|
%a.dropdown-item.open-with-link{ href: 'vscode://vscode.git/clone?url=' + escaped_http_url_to_repo }
|
2021-03-11 19:13:27 +05:30
|
|
|
.gl-new-dropdown-item-text-wrapper
|
2021-09-04 01:27:46 +05:30
|
|
|
= _('Visual Studio Code (HTTPS)')
|
2022-07-16 23:28:13 +05:30
|
|
|
- if ssh_enabled?
|
|
|
|
%a.dropdown-item.open-with-link{ href: 'jetbrains://idea/checkout/git?idea.required.plugins.id=Git4Idea&checkout.repo=' + escaped_ssh_url_to_repo }
|
|
|
|
.gl-new-dropdown-item-text-wrapper
|
|
|
|
= _('IntelliJ IDEA (SSH)')
|
|
|
|
- if http_enabled?
|
|
|
|
%a.dropdown-item.open-with-link{ href: 'jetbrains://idea/checkout/git?idea.required.plugins.id=Git4Idea&checkout.repo=' + escaped_http_url_to_repo }
|
|
|
|
.gl-new-dropdown-item-text-wrapper
|
|
|
|
= _('IntelliJ IDEA (HTTPS)')
|
2021-09-04 01:27:46 +05:30
|
|
|
- if show_xcode_link?(@project)
|
|
|
|
%a.dropdown-item.open-with-link{ href: xcode_uri_to_repo(@project) }
|
|
|
|
.gl-new-dropdown-item-text-wrapper
|
|
|
|
= _("Xcode")
|