_clone.html.haml 1.62 KB
Newer Older
1
- project = project || @project
2
- dropdown_class = local_assigns.fetch(:dropdown_class, '')
3

4
5
.git-clone-holder.js-git-clone-holder
  %a#clone-dropdown.btn.btn-primary.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } }
6
7
    %span.append-right-4.js-clone-dropdown-label
      = _('Clone')
8
    = sprite_icon("chevron-down", css_class: "icon")
9
  %ul.p-3.dropdown-menu.dropdown-menu-large.dropdown-menu-selectable.clone-options-dropdown.qa-clone-options{ class: dropdown_class }
10
    - if ssh_enabled?
11
      %li
12
13
14
15
16
        %label.label-bold
          = _('Clone with SSH')
        .input-group
          = text_field_tag :ssh_project_clone, project.ssh_url_to_repo, class: "js-select-on-focus form-control qa-ssh-clone-url", readonly: true, aria: { label: 'Project clone URL' }
          .input-group-append
17
            = clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text btn-default btn-clipboard")
18
19
            = render_if_exists 'projects/buttons/geo'
    - if http_enabled?
20
      %li.pt-2
21
22
23
        %label.label-bold
          = _('Clone with %{http_label}') % { http_label: gitlab_config.protocol.upcase }
        .input-group
24
          = text_field_tag :http_project_clone, project.http_url_to_repo, class: "js-select-on-focus form-control qa-http-clone-url", readonly: true, aria: { label: 'Project clone URL' }
25
          .input-group-append
26
            = clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text btn-default btn-clipboard")
27
            = render_if_exists 'projects/buttons/geo'
28
    = render_if_exists 'projects/buttons/kerberos_clone_field'