Skip to content
Snippets Groups Projects
Commit c004bb3e authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'add-disabled-delete-button' into 'master'

Add disabled delete button to protected branches

## What does this MR do?
Add's a disabled CSS style for the delete button on protected branches instead of hiding the button

## What are the relevant issue numbers?
Closes #22358

See merge request !6439
parents c0c45c72 f0150ef4
No related branches found
No related tags found
1 merge request!6439Add disabled delete button to protected branches
Pipeline #
Loading
@@ -70,6 +70,7 @@ v 8.13.0 (unreleased)
Loading
@@ -70,6 +70,7 @@ v 8.13.0 (unreleased)
- Fix Long commit messages overflow viewport in file tree - Fix Long commit messages overflow viewport in file tree
- Revert avoid touching file system on Build#artifacts? - Revert avoid touching file system on Build#artifacts?
- Stop using a Redis lease when updating the project activity timestamp whenever a new event is created - Stop using a Redis lease when updating the project activity timestamp whenever a new event is created
- Add disabled delete button to protected branches (ClemMakesApps)
- Add broadcast messages and alerts below sub-nav - Add broadcast messages and alerts below sub-nav
- Better empty state for Groups view - Better empty state for Groups view
- Update ruby-prof to 0.16.2. !6026 (Elan Ruusamäe) - Update ruby-prof to 0.16.2. !6026 (Elan Ruusamäe)
Loading
Loading
Loading
@@ -30,8 +30,8 @@
Loading
@@ -30,8 +30,8 @@
   
= render 'projects/buttons/download', project: @project, ref: branch.name = render 'projects/buttons/download', project: @project, ref: branch.name
   
- if can_remove_branch?(@project, branch.name) - if can?(current_user, :push_code, @project)
= link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: 'btn btn-remove remove-row has-tooltip', title: "Delete branch", method: :delete, data: { confirm: "Deleting the '#{branch.name}' branch cannot be undone. Are you sure?", container: 'body' }, remote: true do = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: "btn btn-remove remove-row has-tooltip #{can_remove_branch?(@project, branch.name) ? '' : 'disabled'}", title: "Delete branch", method: :delete, data: { confirm: "Deleting the '#{branch.name}' branch cannot be undone. Are you sure?", container: 'body' }, remote: true do
= icon("trash-o") = icon("trash-o")
   
- if branch.name != @repository.root_ref - if branch.name != @repository.root_ref
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment