diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-12 13:47:30 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-12 13:47:30 -0500 |
commit | b8401cd0b201ab9caecb60dcc477637e70da4df9 (patch) | |
tree | e197770a94a39ea4956007503440d13cf0b5434e /app/views/projects/branches | |
parent | b75f9721df6c7f5231a9d19e38ec8f0395957c0d (diff) | |
parent | 7f01d49b69130343d95d7ec470d69aeb14fb94fe (diff) | |
download | gitlab-ce-b8401cd0b201ab9caecb60dcc477637e70da4df9.tar.gz |
Merge branch 'master' into bootstrap4
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 4 |
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 483ddb28df4..016894577c0 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -4,7 +4,7 @@ - diverging_commit_counts = @repository.diverging_commit_counts(branch) - number_commits_behind = diverging_commit_counts[:behind] - number_commits_ahead = diverging_commit_counts[:ahead] -- merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project)) +- merge_project = merge_request_source_project_for_project(@project) %li{ class: "branch-item js-branch-#{branch.name}" } .branch-info .branch-title @@ -61,7 +61,7 @@ title: s_('Branches|The default branch cannot be deleted') } = icon("trash-o") - elsif protected_branch?(@project, branch) - - if can?(current_user, :delete_protected_branch, @project) + - if can?(current_user, :push_to_delete_protected_branch, @project) %button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip", title: s_('Branches|Delete protected branch'), data: { toggle: "modal", |