summaryrefslogtreecommitdiff
path: root/app/views/projects/branches
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-22 14:39:09 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-22 14:39:09 +0300
commit0455391add2032dddc7353d1b0ae36d591818d3f (patch)
treefac9a9328a36b7f54ace89dd992e50a6f35470bc /app/views/projects/branches
parente089b11b7a4026acc7706e519682f4b7141b2bcd (diff)
downloadgitlab-ce-0455391add2032dddc7353d1b0ae36d591818d3f.tar.gz
Improve branch-removal logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r--app/views/projects/branches/_branch.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml
index f0731977098..87f4dd88c27 100644
--- a/app/views/projects/branches/_branch.html.haml
+++ b/app/views/projects/branches/_branch.html.haml
@@ -16,8 +16,8 @@
%i.icon-copy
Compare
- - if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref
- = link_to project_branch_path(@project, branch.name), class: 'btn btn-grouped btn-small remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do
+ - if can_remove_branch?(@project, branch.name)
+ = link_to project_branch_path(@project, branch.name), class: 'btn btn-grouped btn-small btn-remove remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do
%i.icon-trash
- if commit