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

_branches_list.html.haml « protected_branches « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bb49f4de8736ce2422f605b09c67824ac4ef0040 (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
29
30
31
32
33
34
- unless @branches.empty?
  %br
  %h4 Already Protected:
  %table.table.protected-branches-list
    %thead
      %tr.no-border
        %th Branch
        %th Developers can push
        %th Last commit
        %th

    %tbody
      - @branches.each do |branch|
        - @url = namespace_project_protected_branch_path(@project.namespace, @project, branch)
        %tr
          %td
            = link_to namespace_project_commits_path(@project.namespace, @project, branch.name) do
              %strong= branch.name
              - if @project.root_ref?(branch.name)
                %span.label.label-info default
            %td
              = check_box_tag "developers_can_push", branch.id, branch.developers_can_push, "data-url" => @url
            %td
              - if commit = branch.commit
                = link_to namespace_project_commit_path(@project.namespace, @project, commit.id), class: 'commit_short_id' do
                  = commit.short_id
                ·
                #{time_ago_with_tooltip(commit.committed_date)}
              - else
                (branch was removed from repository)
            %td
              .pull-right
                - if can? current_user, :admin_project, @project
                  = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-remove btn-sm"