diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-06 18:27:12 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-11 10:51:16 +0200 |
commit | 083b0a9b034a0e4004c012444f1a8811bd96ed29 (patch) | |
tree | 942fcb5b65d17323130f6e8b5a6a499b2235c07d /app/views/projects/commit | |
parent | 1747a573dff40ab51ba892bf9f5293e3c9b794d6 (diff) | |
download | gitlab-ce-083b0a9b034a0e4004c012444f1a8811bd96ed29.tar.gz |
Hide file/directory creation buttons
Diffstat (limited to 'app/views/projects/commit')
-rw-r--r-- | app/views/projects/commit/_commit_box.html.haml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index e391f08acca..213c4c90a0e 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -1,3 +1,5 @@ +- can_collaborate = can_collaborate_with_project?(@project) + .page-content-header.js-commit-box{ 'data-commit-path' => branches_project_commit_path(@project, @commit.id) } .header-main-content = render partial: 'signature', object: @commit.signature @@ -32,10 +34,10 @@ %li.visible-xs-block.visible-sm-block = link_to project_tree_path(@project, @commit) do #{ _('Browse Files') } - - unless @commit.has_been_reverted?(current_user) + - if can_collaborate && !@commit.has_been_reverted?(current_user) %li.clearfix = revert_commit_link(@commit, project_commit_path(@project, @commit.id), has_tooltip: false) - - if can_collaborate_with_project?(@project) + - if can_collaborate %li.clearfix = cherry_pick_commit_link(@commit, project_commit_path(@project, @commit.id), has_tooltip: false) - if can?(current_user, :push_code, @project) |