diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-06-29 15:25:04 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-07-05 16:54:22 -0500 |
commit | 29c50c53159333bdd124d4d3584ae826f49c28ad (patch) | |
tree | 4f8e56e18100c64186f0e819a5b0112effcaab27 /app/helpers/button_helper.rb | |
parent | fbaabb3911c6fec25edc25bfffad94ae2a7c0e28 (diff) | |
download | gitlab-ce-29c50c53159333bdd124d4d3584ae826f49c28ad.tar.gz |
Default Git access protocol to `web`
Diffstat (limited to 'app/helpers/button_helper.rb')
-rw-r--r-- | app/helpers/button_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index a64e96eaec9..7fd20d13010 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -40,7 +40,7 @@ module ButtonHelper type: :button end - def http_clone_button(project, placement = 'right') + def http_clone_button(project, placement = 'right', append_link = true) klass = 'http-selector' klass << ' has-tooltip' if current_user.try(:require_password?) @@ -48,7 +48,7 @@ module ButtonHelper content_tag :a, protocol, class: klass, - href: project.http_url_to_repo, + href: (project.http_url_to_repo if append_link), data: { html: true, placement: placement, @@ -57,13 +57,13 @@ module ButtonHelper } end - def ssh_clone_button(project, placement = 'right') + def ssh_clone_button(project, placement = 'right', append_link = true) klass = 'ssh-selector' klass << ' has-tooltip' if current_user.try(:require_ssh_key?) content_tag :a, 'SSH', class: klass, - href: project.ssh_url_to_repo, + href: (project.ssh_url_to_repo if append_link), data: { html: true, placement: placement, |