diff options
Diffstat (limited to 'app/helpers/button_helper.rb')
-rw-r--r-- | app/helpers/button_helper.rb | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index d6c05843743..ee2cb6ab0ea 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -23,36 +23,34 @@ module ButtonHelper end def http_clone_button(project) - klass = 'btn js-protocol-switch' - klass << ' active' if default_clone_protocol == 'http' + klass = 'http-selector' klass << ' has_tooltip' if current_user.try(:require_password?) protocol = gitlab_config.protocol.upcase - content_tag :button, protocol, + content_tag :a, protocol, class: klass, + href: @project.http_url_to_repo, data: { - clone: project.http_url_to_repo, + html: true, + placement: 'right', container: 'body', - html: 'true', title: "Set a password on your account<br>to pull or push via #{protocol}" - }, - type: :button + } end def ssh_clone_button(project) - klass = 'btn js-protocol-switch' - klass << ' active' if default_clone_protocol == 'ssh' + klass = 'ssh-selector' klass << ' has_tooltip' if current_user.try(:require_ssh_key?) - content_tag :button, 'SSH', + content_tag :a, 'SSH', class: klass, + href: project.ssh_url_to_repo, data: { - clone: project.ssh_url_to_repo, + html: true, + placement: 'right', container: 'body', - html: 'true', title: 'Add an SSH key to your profile<br>to pull or push via SSH.' - }, - type: :button + } end end |