summaryrefslogtreecommitdiff
path: root/app/views/projects/protected_branches/_branches_list.html.haml
blob: 04b19a8c5a7389c97f7ad9575275a0ce96cc80b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.panel.panel-default.protected-branches-list
  - if @protected_branches.empty?
    .panel-heading
      %h3.panel-title
        Protected branch (#{@protected_branches.size})
    %p.settings-message.text-center
      There are currently no protected branches, protect a branch with the form above.
  - else
    - can_admin_project = can?(current_user, :admin_project, @project)

    %table.table.table-bordered
      %colgroup
        %col{ width: "25%" }
        %col{ width: "30%" }
        %col{ width: "25%" }
        %col{ width: "20%" }
      %thead
        %tr
          %th Protected branch (#{@protected_branches.size})
          %th Last commit
          %th Allowed to merge
          %th Allowed to push
          - if can_admin_project
            %th
      %tbody
        = render partial: @protected_branches, locals: { can_admin_project: can_admin_project }

    = paginate @protected_branches, theme: 'gitlab'