diff --git a/app/views/blame/_head.html.haml b/app/views/blame/_head.html.haml index 175719b..85da180 100644 --- a/app/views/blame/_head.html.haml +++ b/app/views/blame/_head.html.haml @@ -4,7 +4,4 @@ = nav_link(controller: :refs) do = link_to 'Source', project_tree_path(@project, @ref) %li.right - .input-prepend.project_clone_holder - %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH - %button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" + = render "shared/clone_panel" diff --git a/app/views/projects/_clone_panel.html.haml b/app/views/projects/_clone_panel.html.haml index 4411ff1..aa1a9cd 100644 --- a/app/views/projects/_clone_panel.html.haml +++ b/app/views/projects/_clone_panel.html.haml @@ -1,11 +1,7 @@ .project_clone_panel .row .span7 - .form-horizontal - .input-prepend.project_clone_holder - %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH - %button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" + .form-horizontal= render "shared/clone_panel" .span4.right .right - unless @project.empty_repo? diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml new file mode 100644 index 0000000..947dc47 --- /dev/null +++ b/app/views/shared/_clone_panel.html.haml @@ -0,0 +1,4 @@ +.input-prepend.project_clone_holder + %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH + %button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase + = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" diff --git a/app/views/tree/_head.html.haml b/app/views/tree/_head.html.haml index f1b3f63..f8e5c99 100644 --- a/app/views/tree/_head.html.haml +++ b/app/views/tree/_head.html.haml @@ -4,7 +4,4 @@ = nav_link(controller: :tree) do = link_to 'Source', project_tree_path(@project, @ref) %li.right - .input-prepend.project_clone_holder - %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH - %button{class: "btn small", :"data-clone" => @project.http_url_to_repo} HTTP - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" + = render "shared/clone_panel" \ No newline at end of file -- libgit2 0.21.2