Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_delete_branch_modal_button.html.haml « branches « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 829a459ad2ca7327dc793de416cabc4ab38ad594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- if branch.name == @project.repository.root_ref
  .js-delete-branch-button{ data: { tooltip: s_('Branches|The default branch cannot be deleted'),
    disabled: true.to_s } }
- elsif protected_branch?(@project, branch)
  - if can?(current_user, :push_to_delete_protected_branch, @project)
    .js-delete-branch-button{ data: { branch_name: branch.name,
      is_protected_branch: true.to_s,
      merged: merged.to_s,
      default_branch_name: @project.repository.root_ref,
      delete_path: project_branch_path(@project, branch.name) } }
  - else
    .js-delete-branch-button{ data: { is_protected_branch: true.to_s,
      disabled: true.to_s } }
- else
  .js-delete-branch-button{ data: { branch_name: branch.name,
    merged: merged.to_s,
    default_branch_name: @project.repository.root_ref,
    delete_path: project_branch_path(@project, branch.name) } }