<commit_before>- if user_can_edit_team?
  = link_to edit_team_path(@team), class: 'btn btn-default pull-right', type: 'button' do
    Settings
    %span.glyphicon.glyphicon-cog

.clearfix
  = image_tag @team.avatar.icon.url, class: 'pull-left thumbnail' if @team.avatar?

  %h1= @team.name

.panel.panel-default
  .panel-heading Info
  .panel-body= markdown @team.description

.panel.panel-default
  .panel-heading Roster
  - if user_can_edit_team?
    .panel-body
      = link_to recruit_team_path(@team), class: 'btn btn-default' do
        Invite
        %span.glyphicon.glyphicon-plus
  %ul.list-group
    - present_collection(@team.player_users).each do |user|
      %li.list-group-item
        = user.listing

        - if user == current_user
          .button-group.pull-right
            = button_to leave_team_path(@team), method: :patch, class: 'btn btn-danger',
                        data: { confirm: 'Are you sure you want to leave this team?' } do
              Leave
              %span.glyphicon.glyphicon-remove
        - elsif user_can_edit_team?
          .button-group.pull-right
            = button_to leave_team_path(@team, user_id: user.id),
                        method: :patch, class: 'btn btn-danger',
                        data: { confirm: "Are you sure you want to kick #{user.name}?" } do
              Kick
              %span.glyphicon.glyphicon-remove

.panel.panel-default
  .panel-heading Transfers
  %ul.list-group
    - @team.transfers.each do |transfer|
      %li.list-group-item
        - present(transfer.user) do |user|
          = user.listing titles: false
        - if transfer.is_joining?
          joined the team
        - else
          left the team
        on #{transfer.created_at.strftime('%c')}

- unless @team.rosters.empty?
  .panel.panel-default
    .panel-heading Leagues
    %ul.list-group
      - @team.rosters.each do |roster|
        %li.list-group-item
          - roster_p = present roster
          = link_to roster.competition, league_path(roster.competition)
          #{roster.division}: #{roster_p.link}.
          Signed up on #{roster_p.created_at_s}.
<commit_msg>Linked matches to teams, closing #10<commit_after>- if user_can_edit_team?
  = link_to edit_team_path(@team), class: 'btn btn-default pull-right', type: 'button' do
    Settings
    %span.glyphicon.glyphicon-cog

.clearfix
  = image_tag @team.avatar.icon.url, class: 'pull-left thumbnail' if @team.avatar?

  %h1= @team.name

.panel.panel-default
  .panel-heading Info
  .panel-body= markdown @team.description

.panel.panel-default
  .panel-heading Roster
  - if user_can_edit_team?
    .panel-body
      = link_to recruit_team_path(@team), class: 'btn btn-default' do
        Invite
        %span.glyphicon.glyphicon-plus
  %ul.list-group
    - present_collection(@team.player_users).each do |user|
      %li.list-group-item
        = user.listing

        - if user == current_user
          .button-group.pull-right
            = button_to leave_team_path(@team), method: :patch, class: 'btn btn-danger',
                        data: { confirm: 'Are you sure you want to leave this team?' } do
              Leave
              %span.glyphicon.glyphicon-remove
        - elsif user_can_edit_team?
          .button-group.pull-right
            = button_to leave_team_path(@team, user_id: user.id),
                        method: :patch, class: 'btn btn-danger',
                        data: { confirm: "Are you sure you want to kick #{user.name}?" } do
              Kick
              %span.glyphicon.glyphicon-remove

.panel.panel-default
  .panel-heading Transfers
  %ul.list-group
    - @team.transfers.each do |transfer|
      %li.list-group-item
        - present(transfer.user) do |user|
          = user.listing titles: false
        - if transfer.is_joining?
          joined the team
        - else
          left the team
        on #{transfer.created_at.strftime('%c')}

- unless @team.rosters.empty?
  .panel.panel-default
    .panel-heading Leagues
    %ul.list-group
      - @team.rosters.each do |roster|
        %li.list-group-item
          - roster_p = present roster
          = link_to roster.competition, league_path(roster.competition)
          #{roster.division}: #{roster_p.link}.
          Signed up on #{roster_p.created_at_s}.

  .panel.panel-default
    .panel-heading Upcoming Matches
    %ul.list-group
      - @team.rosters.each do |roster|
        - present_collection(roster.matches.pending).each do |match|
          %li.list-group-item= match.link

{'fraction_non_alphanumeric': 0.1147396293027361, 'fraction_numerical': 0.00088261253309797, 'mean_word_length': 2.1522948539638387, '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': '1659785', 'n_tokens_mistral': 1474, 'n_tokens_neox': 1431, 'n_words': 312}