<commit_before><% provide(:title, @competition.name) %>

<%= link_to "Alle Wettbewerbe anzeigen", jmd_competitions_path, class: "btn" %>

<dl>
  <dt>Saison</dt>
    <dd><%= @competition.season %></dd>
  <dt>Runde</dt>
    <dd><%= @competition.round.name %></dd>
  <dt>Schule</dt>
    <dd><%= @competition.host.name %> <%= flag_tag(@competition.host.country.country_code) %></dd>
  <dt>Dauer</dt>
    <dd><%= "#{l @competition.begins, format: :long} – #{l @competition.ends, format: :long}" %></dd>
  <dt>Urkundenvergabe</dt>
    <dd><%= @competition.certificate_date ?
            (l @competition.certificate_date, format: :long) : "unbekannt" %></dd>
</dl>

<%= link_to "Vorspiele anzeigen", jmd_competition_performances_path(@competition), class: "btn" %>
<%= link_to "Ergebnisse eintragen", jmd_competition_appearances_path(@competition), class: "btn" %>
<%= link_to "Jurybögen drucken", make_jury_sheets_jmd_competition_performances_path(@competition),
            class: "btn" %>
<%= link_to "Urkunden drucken", make_certificates_jmd_competition_performances_path(@competition),
            class: "btn" %>

<h3>Statistik</h3>

<table class="table table-bordered">
  <thead>
    <tr>
      <th colspan="3">Teilnehmer</th>
      <th colspan="3">Wertungen</th>
      <th colspan="2">Auftritte</th>
    </tr>
    <tr>
      <th>Gesamt</th>
      <th>Klassik</th>
      <th>Pop</th>
      <th>Gesamt</th>
      <th>Klassik</th>
      <th>Pop</th>
      <th>Gesamt</th>
      <th>ohne Ergebnis</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><%= @competition.participants.size %></td>
      <td></td>
      <td></td>
      <td><%= @competition.performances.size %></td>
      <td><%= @competition.performances.classical.size %></td>
      <td><%= @competition.performances.popular.size %></td>
      <td><%= @competition.appearances.size %></td>
      <td><%= @competition.appearances.pointless.size %></td>
    </tr>
  </tbody>
</table>

<% if can? :manage, Competition %>
  <h3>Admin</h3>

  <%= if @competition.can_be_advanced_from?
      link_to "Weiterleitungen migrieren…", list_advancing_jmd_competition_path(@competition),
              class: "btn"
      end %>
  <%= if @competition.can_be_advanced_to?
      link_to "Willkommensmails senden", welcome_advanced_jmd_competition_path,
              class: "btn btn-warning", confirm: "Soll(en) wirklich #{@competition.participants.size} Teilnehmer benachrichtigt werden?"
      end %>
<% end %><commit_msg>Remove classical/pop breakdown from participants statistic<commit_after><% provide(:title, @competition.name) %>

<%= link_to "Alle Wettbewerbe anzeigen", jmd_competitions_path, class: "btn" %>

<dl>
  <dt>Saison</dt>
    <dd><%= @competition.season %></dd>
  <dt>Runde</dt>
    <dd><%= @competition.round.name %></dd>
  <dt>Schule</dt>
    <dd><%= @competition.host.name %> <%= flag_tag(@competition.host.country.country_code) %></dd>
  <dt>Dauer</dt>
    <dd><%= "#{l @competition.begins, format: :long} – #{l @competition.ends, format: :long}" %></dd>
  <dt>Urkundenvergabe</dt>
    <dd><%= @competition.certificate_date ?
            (l @competition.certificate_date, format: :long) : "unbekannt" %></dd>
</dl>

<%= link_to "Vorspiele anzeigen", jmd_competition_performances_path(@competition), class: "btn" %>
<%= link_to "Ergebnisse eintragen", jmd_competition_appearances_path(@competition), class: "btn" %>
<%= link_to "Jurybögen drucken", make_jury_sheets_jmd_competition_performances_path(@competition),
            class: "btn" %>
<%= link_to "Urkunden drucken", make_certificates_jmd_competition_performances_path(@competition),
            class: "btn" %>

<h3>Statistik</h3>

<table class="table table-bordered">
  <thead>
    <tr>
      <th colspan="1">Teilnehmer</th>
      <th colspan="3">Wertungen</th>
      <th colspan="2">Auftritte</th>
    </tr>
    <tr>
      <th>Gesamt</th>
      <th>Gesamt</th>
      <th>Klassik</th>
      <th>Pop</th>
      <th>Gesamt</th>
      <th>ohne Ergebnis</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><%= @competition.participants.size %></td>
      <td><%= @competition.performances.size %></td>
      <td><%= @competition.performances.classical.size %></td>
      <td><%= @competition.performances.popular.size %></td>
      <td><%= @competition.appearances.size %></td>
      <td><%= @competition.appearances.pointless.size %></td>
    </tr>
  </tbody>
</table>

<% if can? :manage, Competition %>
  <h3>Admin</h3>

  <%= if @competition.can_be_advanced_from?
      link_to "Weiterleitungen migrieren…", list_advancing_jmd_competition_path(@competition),
              class: "btn"
      end %>
  <%= if @competition.can_be_advanced_to?
      link_to "Willkommensmails senden", welcome_advanced_jmd_competition_path,
              class: "btn btn-warning", confirm: "Soll(en) wirklich #{@competition.participants.size} Teilnehmer benachrichtigt werden?"
      end %>
<% end %>
{'fraction_non_alphanumeric': 0.18909016893954814, 'fraction_numerical': 0.0028495827396702628, 'mean_word_length': 3.812928501469148, 'pattern_counts': {'":': 0, '<': 191, '<?xml version=': 0, '>': 191, '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': '4215554', 'n_tokens_mistral': 1946, 'n_tokens_neox': 1859, 'n_words': 305}