<commit_before>%div

  - if User.current.git_allowed_to?(:create_repository_protected_branches, @repository)
    .contextual= link_to l(:label_protected_branch_add), new_repository_protected_branch_path(@repository), class: 'icon icon-add modal-box'

  %h3
    = l(:label_protected_branches)
    = link_to "(#{l(:label_gitolite_documentation)})", 'http://gitolite.com/gitolite/conf.html#rules', target: '_blank'

  - if @repository_protected_branches.any?

    %table{ class: 'table table-hover',
            id: 'protected_branches',
            data: { 'update-url' => sort_repository_protected_branches_url },
            style: "opacity: #{@repository.protected_branches_enabled? ? '1' : '0.5'};" }
      %thead
        %tr
          %th
          %th= l(:label_permissions)
          %th= l(:label_branch_path)
          %th= l(:label_user_list)
          %th

      %tbody
        - @repository_protected_branches.each do |protected_branch|
          = content_tag_for(:tr, protected_branch) do
            %td
              %span{ class: 'handle' }
                [drag]

            %td
              - color = protected_branch.permissions == '-' ? 'important' : 'success'
              %span{ class: "label label-#{color}" }= protected_branch.permissions

            %td{ style: 'font-family: Consolas;' }= protected_branch.path
<commit_msg>Rails 5 does not support content_tag_for anymore<commit_after>%div

  - if User.current.git_allowed_to?(:create_repository_protected_branches, @repository)
    .contextual= link_to l(:label_protected_branch_add), new_repository_protected_branch_path(@repository), class: 'icon icon-add modal-box'

  %h3
    = l(:label_protected_branches)
    = link_to "(#{l(:label_gitolite_documentation)})", 'http://gitolite.com/gitolite/conf.html#rules', target: '_blank'

  - if @repository_protected_branches.any?

    %table{ class: 'table table-hover',
            id: 'protected_branches',
            data: { 'update-url' => sort_repository_protected_branches_url },
            style: "opacity: #{@repository.protected_branches_enabled? ? '1' : '0.5'};" }
      %thead
        %tr
          %th
          %th= l(:label_permissions)
          %th= l(:label_branch_path)
          %th= l(:label_user_list)
          %th

      %tbody
        - @repository_protected_branches.each do |protected_branch|
          %tr{ class: 'protected_branch'
               id: "protected_branch_#{#{protected_branch.id}" }
            %td
              %span{ class: 'handle' }
                [drag]

            %td
              - color = protected_branch.permissions == '-' ? 'important' : 'success'
              %span{ class: "label label-#{color}" }= protected_branch.permissions

            %td{ style: 'font-family: Consolas;' }= protected_branch.path

{'fraction_non_alphanumeric': 0.13185238265854532, 'fraction_numerical': 0.0032246506628448583, 'mean_word_length': 2.678524374176548, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2365106', 'n_tokens_mistral': 873, 'n_tokens_neox': 851, 'n_words': 152}