_clone_panel.html.haml 1.27 KB
Newer Older
1
2
3
- project = project || @project
.git-clone-holder.input-group
  .input-group-btn
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    %button{ |
      class: "btn #{ 'active' if default_clone_protocol == 'ssh' }#{ ' has_tooltip' if current_user && current_user.require_ssh_key? }", |
      :"data-clone" => project.ssh_url_to_repo, |
      :"data-title" => "Add an SSH key to your profile<br> to pull or push via SSH",
      :"data-html" => "true",
      :"data-container" => "body"}
      SSH
    %button{ |
      class: "btn #{ 'active' if default_clone_protocol == 'http' }#{ ' has_tooltip' if current_user && current_user.password_automatically_set? }", |
      :"data-clone" => project.http_url_to_repo, |
      :"data-title" => "Set a password on your account<br> to pull or push via #{gitlab_config.protocol.upcase}",
      :"data-html" => "true",
      :"data-container" => "body"}
      = gitlab_config.protocol.upcase
18
  = text_field_tag :project_clone, default_url_to_repo(project), class: "one_click_select form-control", readonly: true
19
20
21
22
23
  - if project.kind_of?(Project)
    .input-group-addon
      .visibility-level-label.has_tooltip{'data-title' => "#{visibility_level_label(project.visibility_level)} project" }
        = visibility_level_icon(project.visibility_level)
        = visibility_level_label(project.visibility_level).downcase