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
This commit is contained in:
commit
d9ccc3af6f
3 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ module DropdownsHelper
|
|||
|
||||
def dropdown_toggle(toggle_text, data_attr, options = {})
|
||||
default_label = data_attr[:default_label]
|
||||
content_tag(:button, class: "dropdown-menu-toggle #{options[:toggle_class] if options.key?(:toggle_class)}", id: (options[:id] if options.key?(:id)), type: "button", data: data_attr) do
|
||||
content_tag(:button, disabled: options[:disabled], class: "dropdown-menu-toggle #{options[:toggle_class] if options.key?(:toggle_class)}", id: (options[:id] if options.key?(:id)), type: "button", data: data_attr) do
|
||||
output = content_tag(:span, toggle_text, class: "dropdown-toggle-text #{'is-default' if toggle_text == default_label}")
|
||||
output << icon('chevron-down')
|
||||
output.html_safe
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue