summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-09-04 12:05:08 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-09-04 12:05:21 -0400
commit0bc4ecfedd1f8580ab861955b0c21605e5a3aadb (patch)
tree3bcb9c2cc14bf636c9c8811dda11375759300787
parent82a399688316caa9d860d93204f5bfc9b7847a16 (diff)
downloadgitlab-ce-0bc4ecfedd1f8580ab861955b0c21605e5a3aadb.tar.gz
Change projects/empty to include the clone_panel partial instead of duplicating
-rw-r--r--app/views/projects/_clone_panel.html.haml22
-rw-r--r--app/views/projects/empty.html.haml10
2 files changed, 13 insertions, 19 deletions
diff --git a/app/views/projects/_clone_panel.html.haml b/app/views/projects/_clone_panel.html.haml
index 76059f32237..20891610ace 100644
--- a/app/views/projects/_clone_panel.html.haml
+++ b/app/views/projects/_clone_panel.html.haml
@@ -8,14 +8,14 @@
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
.span4.right
.right
- - if can? current_user, :download_code, @project
- = link_to archive_project_repository_path(@project), class: "btn small grouped" do
- %i.icon-download-alt
- Download
- - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
- = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do
- Merge Request
- - if @project.issues_enabled && can?(current_user, :write_issue, @project)
- = link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do
- Issue
-
+ - unless @project.empty_repo?
+ - if can? current_user, :download_code, @project
+ = link_to archive_project_repository_path(@project), class: "btn small grouped" do
+ %i.icon-download-alt
+ Download
+ - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
+ = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do
+ Merge Request
+ - if @project.issues_enabled && can?(current_user, :write_issue, @project)
+ = link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do
+ Issue
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml
index 6ec7015a82e..d9a151fc706 100644
--- a/app/views/projects/empty.html.haml
+++ b/app/views/projects/empty.html.haml
@@ -1,12 +1,6 @@
= render 'shared/no_ssh'
-.project_clone_panel
- .row
- .span7
- .form-horizontal
- .input-prepend.project_clone_holder
- = link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo
- = link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo
- = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
+= render 'clone_panel'
+
%div.git-empty
%h4 Git global setup:
%pre.dark