diff options
author | Grzegorz Bizon | OOO until May 7th <grzegorz@gitlab.com> | 2018-04-30 15:00:04 +0000 |
---|---|---|
committer | Grzegorz Bizon | OOO until May 7th <grzegorz@gitlab.com> | 2018-04-30 15:00:04 +0000 |
commit | d9ccc3af6f8d7f7890effc6c279ac6a0c0597a26 (patch) | |
tree | 9b412a01ac49273a10cbf1854257304982846b81 /app/views/projects/protected_branches | |
parent | 9267ef0bd1d2d9ee4b7fe596762fec3e978a02f3 (diff) | |
parent | 9904ac8129d67ea760f2fa3727f7062805b0e4f7 (diff) | |
download | gitlab-ce-d9ccc3af6f8d7f7890effc6c279ac6a0c0597a26.tar.gz |
Merge branch 'ce-jej/branch-unprotection-disable-ui' into 'master'
Backports EE changes from disabling branch unprotect UI
See merge request gitlab-org/gitlab-ce!18262
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" |