Extract shared/clone_panel partial
This commit is contained in:
parent
ff396e0a7e
commit
0447ab375a
4 changed files with 7 additions and 13 deletions
|
@ -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"
|
||||
|
|
|
@ -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?
|
||||
|
|
4
app/views/shared/_clone_panel.html.haml
Normal file
4
app/views/shared/_clone_panel.html.haml
Normal file
|
@ -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"
|
|
@ -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"
|
Loading…
Reference in a new issue