diff options
Diffstat (limited to 'app/views/projects/branches/_branch.html.haml')
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index ed7dbdeae93..020a4361203 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -50,25 +50,25 @@ - if can?(current_user, :push_code, @project) - if branch.name == @project.repository.root_ref - %button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip disabled", + %button{ class: "btn btn-remove remove-row has-tooltip disabled", disabled: true, title: s_('Branches|The default branch cannot be deleted') } - = icon("trash-o") + = sprite_icon("remove") - elsif protected_branch?(@project, branch) - if can?(current_user, :push_to_delete_protected_branch, @project) - %button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip", + %button{ class: "btn btn-remove remove-row has-tooltip", title: s_('Branches|Delete protected branch'), data: { toggle: "modal", target: "#modal-delete-branch", delete_path: project_branch_path(@project, branch.name), branch_name: branch.name, is_merged: ("true" if merged) } } - = icon("trash-o") + = sprite_icon("remove") - else - %button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip disabled", + %button{ class: "btn btn-remove remove-row has-tooltip disabled", disabled: true, title: s_('Branches|Only a project maintainer or owner can delete a protected branch') } - = icon("trash-o") + = sprite_icon("remove") - else = link_to project_branch_path(@project, branch.name), class: "btn btn-remove remove-row qa-remove-btn js-ajax-loading-spinner has-tooltip", @@ -77,4 +77,4 @@ data: { confirm: s_("Branches|Deleting the '%{branch_name}' branch cannot be undone. Are you sure?") % { branch_name: branch.name } }, remote: true, 'aria-label' => s_('Branches|Delete branch') do - = icon("trash-o") + = sprite_icon("remove") |