2014-01-07 22:03:27 -05:00
|
|
|
- project = project || @project
|
2015-12-18 17:12:47 -05:00
|
|
|
|
2016-01-14 11:42:15 -05:00
|
|
|
.git-clone-holder.input-group
|
|
|
|
.input-group-btn
|
2015-12-23 19:57:30 -05:00
|
|
|
%a#clone-dropdown.clone-dropdown-btn.btn{href: '#', 'data-toggle' => 'dropdown'}
|
2015-12-23 12:43:27 -05:00
|
|
|
%span
|
|
|
|
= default_clone_protocol.upcase
|
|
|
|
= icon('angle-down')
|
|
|
|
%ul.dropdown-menu.dropdown-menu-right.clone-options-dropdown
|
|
|
|
%li
|
2015-12-23 19:57:30 -05:00
|
|
|
%a#ssh-selector{href: @project.ssh_url_to_repo}
|
2015-12-23 12:43:27 -05:00
|
|
|
SSH
|
|
|
|
%li
|
2015-12-23 19:57:30 -05:00
|
|
|
%a#http-selector{href: @project.http_url_to_repo}
|
2015-12-23 12:43:27 -05:00
|
|
|
HTTPS
|
2015-12-18 17:12:47 -05:00
|
|
|
|
2015-12-23 12:43:27 -05:00
|
|
|
= text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true
|
|
|
|
.input-group-btn
|
|
|
|
= clipboard_button(clipboard_target: '#project_clone')
|
2015-12-18 17:12:47 -05:00
|
|
|
|
|
|
|
:javascript
|
2015-12-23 12:43:27 -05:00
|
|
|
$('ul.clone-options-dropdown a').on('click',function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var $this = $(this);
|
|
|
|
$('a.clone-dropdown-btn span').text($this.text());
|
2015-12-23 19:57:30 -05:00
|
|
|
$('#project_clone').val($this.attr('href'));
|
2015-12-23 12:43:27 -05:00
|
|
|
});
|