<commit_before>- editable   = can?(:edit, @tournament)
- manageable = can?(:manage, @tournament)
%table{class: "right-headers cushioned"}
  %tr
    %th Name
    %td= link_to_if @tournament.site =~ /^http/, @tournament.name, @tournament.site, class: "external", target: "_external"
    %td{class: "floater top", rowspan: 9}
      - if editable
        = link_to edit_admin_tournament_path(@tournament), remote: true do
          = icon_tag "edit", "Edit Tournament"
  %tr
    %th Start Date
    %td= @tournament.start
  %tr
    %th End Date
    %td= @tournament.finish
  %tr
    %th Rounds
    %td= @tournament.rounds
  %tr
    %th Federation
    %td= @tournament.fed
  %tr
    %th City
    %td= @tournament.city
  %tr
    %th Arbiter
    %td= @tournament.arbiter
  %tr
    %th Deputy
    %td= @tournament.deputy
  %tr
    %th Time Control
    %td= @tournament.time_control
  %tr
    %th Tie Break Rules
    %td{id: "show_tie_breaks"}= @tournament.tie_breaks
    %td{class: "floater"}
      - if editable
        = link_to edit_admin_tournament_path(@tournament, tie_breaks: ""), remote: true do
          = icon_tag "edit", "Edit Tie Breaks"
  %tr
    %th Ranking
    %td{id: "show_ranking"}= @tournament.ranking_summary.fetch(:description)
    %td{class: "floater top", rowspan: 2}
      - if editable
        = link_to edit_admin_tournament_path(@tournament, ranks: ""), remote: true do
          = icon_tag "rank", "Rank Tournament"
  %tr
    %th Upload
    %td= @tournament.upload ? link_to(@tournament.upload.created_at.strftime('%Y-%m-%d'), [:admin, @tournament.upload]) : ''
  %tr
    %th Reporter
    %td= @tournament.user.name
    %td{class: "floater top", rowspan: 2}
      - if manageable
        = link_to edit_admin_tournament_path(@tournament, reporter: ""), remote: true do
          = icon_tag "edit", "Change Reporter"
  %tr
    %th Status
    - if @tournament.status_ok?
      %td= t(@tournament.status)
    - else
      %td{class: "error centered"}
        %a{href: "javascript: $('#dialog_status').dialog('open'); void(0)"}= t("problems")
  %tr
    %th Stage
    %td{id: "show_stage"}= t(@tournament.stage)
    %td{class: "floater"}
      - if editable && @tournament.move_stage_options(current_user).size > 0
        = link_to edit_admin_tournament_path(@tournament, stage: ""), remote: true do
          = icon_tag "edit", "Update Stage"
  %tr
    %th Lock
    %td= @tournament.locked ? "On" : "Off"
    %th{class: "floater"}
      - if manageable
        - if @tournament.locked
          = link_to admin_tournament_path(@tournament, locked: "false"), remote: true, method: :put do
            = icon_tag "unlock", "Unlock Tournament"
        - else
          = link_to admin_tournament_path(@tournament, locked: "true"), remote: true, method: :put do
            = icon_tag "lock", "Lock Tournament"<commit_msg>Bug fix<commit_after>- editable   = can?(:edit, @tournament)
- manageable = can?(:manage, @tournament)
%table{class: "right-headers cushioned"}
  %tr
    %th Name
    %td= link_to_if @tournament.site =~ /^http/, @tournament.name, @tournament.site, class: "external", target: "_external"
    %td{class: "floater top", rowspan: 9}
      - if editable
        = link_to edit_admin_tournament_path(@tournament), remote: true do
          = icon_tag "edit", "Edit Tournament"
  %tr
    %th Start Date
    %td= @tournament.start
  %tr
    %th End Date
    %td= @tournament.finish
  %tr
    %th Rounds
    %td= @tournament.rounds
  %tr
    %th Federation
    %td= @tournament.fed
  %tr
    %th City
    %td= @tournament.city
  %tr
    %th Arbiter
    %td= @tournament.arbiter
  %tr
    %th Deputy
    %td= @tournament.deputy
  %tr
    %th Time Control
    %td= @tournament.time_control
  %tr
    %th Tie Break Rules
    %td{id: "show_tie_breaks"}= @tournament.tie_breaks
    %td{class: "floater"}
      - if editable
        = link_to edit_admin_tournament_path(@tournament, tie_breaks: ""), remote: true do
          = icon_tag "edit", "Edit Tie Breaks"
  %tr
    %th Ranking
    %td{id: "show_ranking"}= @tournament.ranking_summary.fetch(:description)
    %td{class: "floater top", rowspan: 2}
      - if editable
        = link_to edit_admin_tournament_path(@tournament, ranks: ""), remote: true do
          = icon_tag "rank", "Rank Tournament"
  %tr
    %th Upload
    %td= @tournament.upload ? link_to(@tournament.upload.created_at.strftime('%Y-%m-%d'), [:admin, @tournament.upload]) : ''
  %tr
    %th Reporter
    %td= @tournament.user.name
    %td{class: "floater top", rowspan: 2}
      - if manageable && editable
        = link_to edit_admin_tournament_path(@tournament, reporter: ""), remote: true do
          = icon_tag "edit", "Change Reporter"
  %tr
    %th Status
    - if @tournament.status_ok?
      %td= t(@tournament.status)
    - else
      %td{class: "error centered"}
        %a{href: "javascript: $('#dialog_status').dialog('open'); void(0)"}= t("problems")
  %tr
    %th Stage
    %td{id: "show_stage"}= t(@tournament.stage)
    %td{class: "floater"}
      - if editable && @tournament.move_stage_options(current_user).size > 0
        = link_to edit_admin_tournament_path(@tournament, stage: ""), remote: true do
          = icon_tag "edit", "Update Stage"
  %tr
    %th Lock
    %td= @tournament.locked ? "On" : "Off"
    %th{class: "floater"}
      - if manageable
        - if @tournament.locked
          = link_to admin_tournament_path(@tournament, locked: "false"), remote: true, method: :put do
            = icon_tag "unlock", "Unlock Tournament"
        - else
          = link_to admin_tournament_path(@tournament, locked: "true"), remote: true, method: :put do
            = icon_tag "lock", "Lock Tournament"
{'fraction_non_alphanumeric': 0.1441155743481325, 'fraction_numerical': 0.0017618040873854828, 'mean_word_length': 2.953342618384401, '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': '5005331', 'n_tokens_mistral': 2090, 'n_tokens_neox': 1954, 'n_words': 473}