2014-09-02 18:07:02 +05:30
|
|
|
- project = project || @project
|
2016-01-14 18:37:52 +05:30
|
|
|
|
|
|
|
.git-clone-holder
|
|
|
|
.btn-group.clone-options
|
|
|
|
%a#clone-dropdown.clone-dropdown-btn.btn{href: '#', 'data-toggle' => 'dropdown'}
|
|
|
|
%span
|
|
|
|
= default_clone_protocol.upcase
|
|
|
|
= icon('angle-down')
|
|
|
|
%ul.dropdown-menu.dropdown-menu-right.clone-options-dropdown
|
|
|
|
%li
|
|
|
|
%a#ssh-selector{href: @project.ssh_url_to_repo}
|
|
|
|
SSH
|
|
|
|
%li
|
|
|
|
%a#http-selector{href: @project.http_url_to_repo}
|
|
|
|
HTTPS
|
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
= text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true
|
2015-12-23 02:04:40 +05:30
|
|
|
.input-group-btn
|
|
|
|
= clipboard_button(clipboard_target: '#project_clone')
|
2016-01-14 18:37:52 +05:30
|
|
|
|
|
|
|
:javascript
|
|
|
|
$('ul.clone-options-dropdown a').on('click',function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var $this = $(this);
|
|
|
|
$('a.clone-dropdown-btn span').text($this.text());
|
|
|
|
$('#project_clone').val($this.attr('href'));
|
|
|
|
});
|