Commit 0bc4ecfedd1f8580ab861955b0c21605e5a3aadb
1 parent
82a39968
Exists in
master
and in
4 other branches
Change projects/empty to include the clone_panel partial instead of duplicating
Showing
2 changed files
with
13 additions
and
19 deletions
Show diff stats
app/views/projects/_clone_panel.html.haml
@@ -8,14 +8,14 @@ | @@ -8,14 +8,14 @@ | ||
8 | = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" | 8 | = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" |
9 | .span4.right | 9 | .span4.right |
10 | .right | 10 | .right |
11 | - - if can? current_user, :download_code, @project | ||
12 | - = link_to archive_project_repository_path(@project), class: "btn small grouped" do | ||
13 | - %i.icon-download-alt | ||
14 | - Download | ||
15 | - - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
16 | - = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do | ||
17 | - Merge Request | ||
18 | - - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
19 | - = link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do | ||
20 | - Issue | ||
21 | - | 11 | + - unless @project.empty_repo? |
12 | + - if can? current_user, :download_code, @project | ||
13 | + = link_to archive_project_repository_path(@project), class: "btn small grouped" do | ||
14 | + %i.icon-download-alt | ||
15 | + Download | ||
16 | + - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
17 | + = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do | ||
18 | + Merge Request | ||
19 | + - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
20 | + = link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do | ||
21 | + Issue |
app/views/projects/empty.html.haml
1 | = render 'shared/no_ssh' | 1 | = render 'shared/no_ssh' |
2 | -.project_clone_panel | ||
3 | - .row | ||
4 | - .span7 | ||
5 | - .form-horizontal | ||
6 | - .input-prepend.project_clone_holder | ||
7 | - = link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo | ||
8 | - = link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo | ||
9 | - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" | 2 | += render 'clone_panel' |
3 | + | ||
10 | %div.git-empty | 4 | %div.git-empty |
11 | %h4 Git global setup: | 5 | %h4 Git global setup: |
12 | %pre.dark | 6 | %pre.dark |