diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-04-25 20:42:23 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-04-25 22:02:41 +0100 |
commit | 9904ac8129d67ea760f2fa3727f7062805b0e4f7 (patch) | |
tree | 81121176a1600e4c34e0d03dc6966114154b07e4 /app/views/projects/protected_branches | |
parent | 55f07cc32e7684b21e0c1662c70128df14c6abf7 (diff) | |
download | gitlab-ce-9904ac8129d67ea760f2fa3727f7062805b0e4f7.tar.gz |
Backports EE changes from disabling branch unprotect UI
Diffstat (limited to 'app/views/projects/protected_branches')
-rw-r--r-- | app/views/projects/protected_branches/_branches_list.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/protected_branches/shared/_protected_branch.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/protected_branches/_branches_list.html.haml b/app/views/projects/protected_branches/_branches_list.html.haml index 5377d745371..24d2b971472 100644 --- a/app/views/projects/protected_branches/_branches_list.html.haml +++ b/app/views/projects/protected_branches/_branches_list.html.haml @@ -1,4 +1,4 @@ - can_admin_project = can?(current_user, :admin_project, @project) = render layout: 'projects/protected_branches/shared/branches_list', locals: { can_admin_project: can_admin_project } do - = render partial: 'projects/protected_branches/protected_branch', collection: @protected_branches, locals: { can_admin_project: can_admin_project} + = render partial: 'projects/protected_branches/protected_branch', collection: @protected_branches diff --git a/app/views/projects/protected_branches/shared/_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_protected_branch.html.haml index f5b21f0e887..2d3b2af00c2 100644 --- a/app/views/projects/protected_branches/shared/_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_protected_branch.html.haml @@ -21,4 +21,4 @@ - if can_admin_project %td - = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: 'btn btn-warning' + = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning" |