summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-01-11 13:43:06 +0000
committerRémy Coutable <remy@rymai.me>2018-01-11 13:43:06 +0000
commit442fc4edebfc1c06dde5e3af0bb8fffbd1eb9916 (patch)
tree5c2655b717abcba85f96ce2151fa581e78eaff1e /app/views
parent2f585071cba37b2b85f3148460d98c415a1df2d8 (diff)
parent7034ef29edd853b3d18d3666a19826217990bfb1 (diff)
downloadgitlab-ce-442fc4edebfc1c06dde5e3af0bb8fffbd1eb9916.tar.gz
Merge branch '39988-hide-new-branch-tag-empty-repo' into 'master'
Resolve ""New branch" and "New tag" actions are pointless on an empty repository" Closes #39988 See merge request gitlab-org/gitlab-ce!16332
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/buttons/_dropdown.html.haml13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/views/projects/buttons/_dropdown.html.haml b/app/views/projects/buttons/_dropdown.html.haml
index 2589c53beae..8e8c911185a 100644
--- a/app/views/projects/buttons/_dropdown.html.haml
+++ b/app/views/projects/buttons/_dropdown.html.haml
@@ -30,12 +30,13 @@
%li
= link_to project_new_blob_path(@project, @project.default_branch || 'master') do
#{ _('New file') }
- %li
- = link_to new_project_branch_path(@project) do
- #{ _('New branch') }
- %li
- = link_to new_project_tag_path(@project) do
- #{ _('New tag') }
+ - unless @project.empty_repo?
+ %li
+ = link_to new_project_branch_path(@project) do
+ #{ _('New branch') }
+ %li
+ = link_to new_project_tag_path(@project) do
+ #{ _('New tag') }
- elsif current_user && current_user.already_forked?(@project)
%li
= link_to project_new_blob_path(@project, @project.default_branch || 'master') do