<commit_before><% @page_title = "Schedule: #{@year}" %>

<h2><%= @year %> Schedule</h2>

<%= render_page "shared/years", :year => @year, :discipline => @discipline %>
<%= render_page "shared/disciplines", :year => @year, :discipline => @discipline %>
<%= render "tabs", :calendar_tab => @calendar_tab %>
<%= render_page "schedule/tentative" %>

<%= table :collection => @events, :columns => 7 do %>
  <thead>
    <tr>
      <th class="date">Date</th>
      <th></th>
      <th>Event</th>
      <th class="promoter">Promoter</th> 
      <th class="phone">Phone</th>
      <th class="discipline">Discipline</th>
      <th class="location">Location</th>
    </tr>
  </thead>
  <tbody>
<%- @events.each do |event| -%>
  <tr>
    <td class="date">
      <%= event.date.strftime("%a %-m/%-d") if event.date -%>
    </td>
    <td class="beginner_friendly"><% if event.beginner_friendly? %><i class="icon-ok-circle"></i><% end %></td>
    <%- if event.cancelled %>
    <td><span class="cancelled"><%= event.full_name -%></span> <em>cancelled</em></td>
    <%- elsif event.postponed? %>
    <td><span class="postponed"><%= event.full_name -%></span> <em>postponed</em></td>
    <%- else -%>
    <td class="link">
      <%- if event.flyer.present? && event.flyer_approved? -%>
          <a href="<%= event.flyer -%>"<%= "target='_blank'" if RacingAssociation.current.flyers_in_new_window? %>><%= event.full_name -%><%- if (!event.full_name.include?("MTB") and event.discipline == "Mountain Bike") -%>
          MTB
            <%- end -%></a>
            <%- else -%>
          <%= event.full_name -%><%= " MTB" if !event.full_name.include?("MTB") && event.discipline == "Mountain Bike" -%>
      <%- end -%>
      </td> <commit_msg>Sort events<commit_after><% @page_title = "Schedule: #{@year}" %>

<h2><%= @year %> Schedule</h2>

<%= render_page "shared/years", :year => @year, :discipline => @discipline %>
<%= render_page "shared/disciplines", :year => @year, :discipline => @discipline %>
<%= render "tabs", :calendar_tab => @calendar_tab %>
<%= render_page "schedule/tentative" %>

<%= table :collection => @events, :columns => 7 do %>
  <thead>
    <tr>
      <th class="date">Date</th>
      <th></th>
      <th>Event</th>
      <th class="promoter">Promoter</th> 
      <th class="phone">Phone</th>
      <th class="discipline">Discipline</th>
      <th class="location">Location</th>
    </tr>
  </thead>
  <tbody>
<%- @events.sort.each do |event| -%>
  <tr>
    <td class="date">
      <%= event.date.strftime("%a %-m/%-d") if event.date -%>
    </td>
    <td class="beginner_friendly"><% if event.beginner_friendly? %><i class="icon-ok-circle"></i><% end %></td>
    <%- if event.cancelled %>
    <td><span class="cancelled"><%= event.full_name -%></span> <em>cancelled</em></td>
    <%- elsif event.postponed? %>
    <td><span class="postponed"><%= event.full_name -%></span> <em>postponed</em></td>
    <%- else -%>
    <td class="link">
      <%- if event.flyer.present? && event.flyer_approved? -%>
          <a href="<%= event.flyer -%>"<%= "target='_blank'" if RacingAssociation.current.flyers_in_new_window? %>><%= event.full_name -%><%- if (!event.full_name.include?("MTB") and event.discipline == "Mountain Bike") -%>
          MTB
            <%- end -%></a>
            <%- else -%>
          <%= event.full_name -%><%= " MTB" if !event.full_name.include?("MTB") && event.discipline == "Mountain Bike" -%>
      <%- end -%>
      </td> 
{'fraction_non_alphanumeric': 0.24325891562771818, 'fraction_numerical': 0.0017396346767178893, 'mean_word_length': 3.1616405307599518, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 157, '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': '905470', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1268, 'n_words': 227}