<commit_before>- if user_signed_in?
  - type ||= :nil
  - if user == current_user
    %a.btn.btn-default.btn-block.profile--follow-btn{href: edit_user_profile_path} Edit profile
  - else
    - if current_user.following? user
      %button#editprofile.btn.btn-default.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name }}
        Unfollow
    - else
      %button#editprofile.btn.btn-primary.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name }}
        Follow
  - unless user == current_user
    .btn-group.btn-block
      %button.btn.btn-default.btn-block.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
        Actions
        %span.caret
      %ul.dropdown-menu
        /
          %li
            %a{href: '#', name: 'user-action', data: { action: :block, type: type, target: user.screen_name }}
              %i.fa.fa-minus-circle
              Block
        %li
          %a{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }}
            %i.fa.fa-users
            Manage group memberships
        %li
          %a{href: '#', data: { action: 'report-user', target: user.screen_name }}
            %i.fa.fa-exclamation-triangle
            Report
        - if current_user.mod?
          %li
            %a{href: '#', data: { target: "#modal-privileges", toggle: :modal }}
              %i.fa.fa-wrench
              Check
              = succeed "'s" do
                = user.screen_name
              privileges
          %li
            %a{href: '#', data: { target: "#modal-ban", toggle: :modal }}
              %i.fa.fa-wrench
              - if user.banned?
                Unban or extend ban duration
              - else
                Ban
                = user.screen_name<commit_msg>Forbid admins getting banned<commit_after>- if user_signed_in?
  - type ||= :nil
  - if user == current_user
    %a.btn.btn-default.btn-block.profile--follow-btn{href: edit_user_profile_path} Edit profile
  - else
    - if current_user.following? user
      %button#editprofile.btn.btn-default.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name }}
        Unfollow
    - else
      %button#editprofile.btn.btn-primary.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name }}
        Follow
  - unless user == current_user
    .btn-group.btn-block
      %button.btn.btn-default.btn-block.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
        Actions
        %span.caret
      %ul.dropdown-menu
        /
          %li
            %a{href: '#', name: 'user-action', data: { action: :block, type: type, target: user.screen_name }}
              %i.fa.fa-minus-circle
              Block
        %li
          %a{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }}
            %i.fa.fa-users
            Manage group memberships
        %li
          %a{href: '#', data: { action: 'report-user', target: user.screen_name }}
            %i.fa.fa-exclamation-triangle
            Report
        - if current_user.mod?
          %li
            %a{href: '#', data: { target: "#modal-privileges", toggle: :modal }}
              %i.fa.fa-wrench
              Check
              = succeed "'s" do
                = user.screen_name
              privileges
          - unless user.admin?
            %li
              %a{href: '#', data: { target: "#modal-ban", toggle: :modal }}
                %i.fa.fa-ban
                Ban Control
{'fraction_non_alphanumeric': 0.14327641408751335, 'fraction_numerical': 0.0, 'mean_word_length': 1.8487841945288754, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2248930', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1142, 'n_words': 238}