Commit 0447ab375a988a328823d20cae0ddbbba652d74a
1 parent
ff396e0a
Exists in
master
and in
4 other branches
Extract shared/clone_panel partial
Showing
4 changed files
with
7 additions
and
13 deletions
Show diff stats
app/views/blame/_head.html.haml
| ... | ... | @@ -4,7 +4,4 @@ |
| 4 | 4 | = nav_link(controller: :refs) do |
| 5 | 5 | = link_to 'Source', project_tree_path(@project, @ref) |
| 6 | 6 | %li.right |
| 7 | - .input-prepend.project_clone_holder | |
| 8 | - %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH | |
| 9 | - %button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase | |
| 10 | - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" | |
| 7 | + = render "shared/clone_panel" | ... | ... |
app/views/projects/_clone_panel.html.haml
| 1 | 1 | .project_clone_panel |
| 2 | 2 | .row |
| 3 | 3 | .span7 |
| 4 | - .form-horizontal | |
| 5 | - .input-prepend.project_clone_holder | |
| 6 | - %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH | |
| 7 | - %button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase | |
| 8 | - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" | |
| 4 | + .form-horizontal= render "shared/clone_panel" | |
| 9 | 5 | .span4.right |
| 10 | 6 | .right |
| 11 | 7 | - unless @project.empty_repo? | ... | ... |
| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | +.input-prepend.project_clone_holder | |
| 2 | + %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH | |
| 3 | + %button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase | |
| 4 | + = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" | ... | ... |
app/views/tree/_head.html.haml
| ... | ... | @@ -4,7 +4,4 @@ |
| 4 | 4 | = nav_link(controller: :tree) do |
| 5 | 5 | = link_to 'Source', project_tree_path(@project, @ref) |
| 6 | 6 | %li.right |
| 7 | - .input-prepend.project_clone_holder | |
| 8 | - %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH | |
| 9 | - %button{class: "btn small", :"data-clone" => @project.http_url_to_repo} HTTP | |
| 10 | - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" | |
| 7 | + = render "shared/clone_panel" | |
| 11 | 8 | \ No newline at end of file | ... | ... |