<commit_before><table class="base">
  <caption><%= event.friendly_class_name %>: <%= event.full_name %></caption>
  <tr>
    <th colspan="4"></th>
  </tr>
  <tr>
    <td colspan="2">
      <table>
        <tr>
          <td class="field_label">Name:</td>
          <td>
          	<%= text_field 'event', 'name', :size => 60 %>
		  </td>
        </tr>
        <%- if event.is_a?(SingleDayEvent) and event.parent -%>
        <tr>
          <td class="field_label">Stage Name:</td>
          <td>
          	<%= text_field 'event', 'stage_name', :size => 60 %>
          </td>
        </tr>
        <tr>
          <td class="field_label">Parent:</td>
          <td>
            <%= link_to event.parent.name, 
              {:action => 'show', :id =>  event.parent.to_param}, 
              :class => 'obvious' %> (<%= event.parent.friendly_class_name %>)            
          </td>
        </tr>
        <%- end -%>
        
        <tr>
          <td></td>
          <td>
            <%= render :partial => 'parent', :locals => {:event => event} %>            
          </td>
        </tr>
        <tr>
          <td class="field_label">Type:</td>
          <td><%= select 'event', 'type', 
            [['Single Event (stand-alone races, stages, a single series event)', 'SingleDayEvent'],
               ['Multiday Event (stage races, omniums)', 'MultiDayEvent']] %>
               <%# ['Weekend Series', 'Series'],  %>
               <%# ['Weeknight Series', 'WeeklySeries']] %>
               <%#(weekend events have full BAR points: Cross Crusade)#(weeknight, BAR points only for final) standings: PIR) %>
               </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
  	<td>
  		&nbsp;
	</td>
  </tr>
  <tr valign="top">
    <td>
      <table>
        <tr>
          <td class="field_label">Date:</td>
          <td>
            <%- if @event.is_a?(SingleDayEvent) -%>
            <%= text_field 'event', 'date' %>
            <%- else -%>
              <%= event.start_date.strftime('%A, %B %d, %Y') -%>
              <%- if event.start_date != event.end_date -%>
                 &nbsp;to <br>
                <%= event.end_date.strftime('%A, %B %d, %Y') -%>
              <%- end -%>
            <%- end -%>
          </td>
        </tr>
        <tr>
          <td class="field_label">Time:</td>
          <td><%= text_field 'event', 'time' %></td>
        </tr>
        <tr>
          <td></td>
          <td class="field_label" id="left"><%= check_box 'event', 'cancelled' %> Cancelled</td>
        </tr>
        <tr>
          <td class="field_label">Discipline:</td>
          <td><%= select 'event', 'discipline', Discipline.find_all_names %></td>
        </tr>
        <tr>
          <td></td>
          <td class="field_label left"><%= check_box 'event', 'instructional' %> Instructional</td>
        </tr>
        <tr>
          <td></td>
          <td class="field_label left"><%= check_box 'event', 'practice' %> Practice</td>
        </tr>
        <tr>
          <td class="field_label">Sponsoring Team:</td>
          <td><%= select('event', 'team_id', Team.find(:all).sort_by{|t| t.name}.collect {|t| [ t.name, t.id ] }, { :include_blank => true}) %></td>
        </tr>
        <tr>
          <td class="field_label">City:</td>
          <td><%= text_field 'event', 'city' %></td>
        </tr>
        <tr>
          <td class="field_label">State:</td>
          <td><%= text_field 'event', 'state' %></td>
        </tr>
      </table>
    </td>
    <td>
      <table>
        <tr>
          <td>
            <table class="base" id="inline">
              <tr>
                <th colspan="2">Promoter</th>
              </tr>
              <tr>
                <td class="field_label">Name:</td>
                <td><%= select("event", 
                         "promoter_id", 
                         Promoter.find(:all).sort_by{|p| p.name_or_contact_info}.collect {|p| [ p.name_or_contact_info, p.id ] }, 
                         { :include_blank => true}) %>
                    <%= observe_field(
                      'event_promoter_id', 
                      :url => {:action => 'promoter_changed', :id => @event.id}, :with => 'promoter_id',
                      :before => update_page {|page|
                                    page.visual_effect(:fade, 'promoter_email', :duration => 0.5)
                                    page.visual_effect(:fade, 'promoter_phone', :duration => 0.5)
                                    page.visual_effect(:fade, 'edit_promoter_link', :duration => 0.5)
                                  },
                      :success => evaluate_remote_response
                  ) %>
                </td>
              </tr>
              <tr>
                <td class="field_label">Email:</td>
                <td id="promoter_email"><%= event.promoter_email %></td>
              </tr>
              <tr>
                <td class="field_label">Phone:</td>
                <td id="promoter_phone"><%= event.promoter_phone %></td>
              </tr>
              <tr>
                <td></td>
                <td style="text-align: right;">
                  <span id="edit_promoter_link">
                  <%= link_to(
                        'Edit', 
                        :controller => 'promoters', 
                        :action => 'show', 
                        :id => @event.promoter.id,
                        :event_id => @event.id) if @event.promoter %>
                  </span>
                  &nbsp;<%= link_to(
                        'New', 
                        :controller => 'promoters', 
                        :action => 'new', 
                        :event_id => @event.id) %>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
  	<td>
  		&nbsp;
	</td>
  </tr>
  <tr>
    <td>
      <table><commit_msg>fix promoter edit button on event show page<commit_after><table class="base">
  <caption><%= event.friendly_class_name %>: <%= event.full_name %></caption>
  <tr>
    <th colspan="4"></th>
  </tr>
  <tr>
    <td colspan="2">
      <table>
        <tr>
          <td class="field_label">Name:</td>
          <td>
          	<%= text_field 'event', 'name', :size => 60 %>
		  </td>
        </tr>
        <%- if event.is_a?(SingleDayEvent) and event.parent -%>
        <tr>
          <td class="field_label">Stage Name:</td>
          <td>
          	<%= text_field 'event', 'stage_name', :size => 60 %>
          </td>
        </tr>
        <tr>
          <td class="field_label">Parent:</td>
          <td>
            <%= link_to event.parent.name, 
              {:action => 'show', :id =>  event.parent.to_param}, 
              :class => 'obvious' %> (<%= event.parent.friendly_class_name %>)            
          </td>
        </tr>
        <%- end -%>
        
        <tr>
          <td></td>
          <td>
            <%= render :partial => 'parent', :locals => {:event => event} %>            
          </td>
        </tr>
        <tr>
          <td class="field_label">Type:</td>
          <td><%= select 'event', 'type', 
            [['Single Event (stand-alone races, stages, a single series event)', 'SingleDayEvent'],
               ['Multiday Event (stage races, omniums)', 'MultiDayEvent']] %>
               <%# ['Weekend Series', 'Series'],  %>
               <%# ['Weeknight Series', 'WeeklySeries']] %>
               <%#(weekend events have full BAR points: Cross Crusade)#(weeknight, BAR points only for final) standings: PIR) %>
               </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
  	<td>
  		&nbsp;
	</td>
  </tr>
  <tr valign="top">
    <td>
      <table>
        <tr>
          <td class="field_label">Date:</td>
          <td>
            <%- if @event.is_a?(SingleDayEvent) -%>
            <%= text_field 'event', 'date' %>
            <%- else -%>
              <%= event.start_date.strftime('%A, %B %d, %Y') -%>
              <%- if event.start_date != event.end_date -%>
                 &nbsp;to <br>
                <%= event.end_date.strftime('%A, %B %d, %Y') -%>
              <%- end -%>
            <%- end -%>
          </td>
        </tr>
        <tr>
          <td class="field_label">Time:</td>
          <td><%= text_field 'event', 'time' %></td>
        </tr>
        <tr>
          <td></td>
          <td class="field_label" id="left"><%= check_box 'event', 'cancelled' %> Cancelled</td>
        </tr>
        <tr>
          <td class="field_label">Discipline:</td>
          <td><%= select 'event', 'discipline', Discipline.find_all_names %></td>
        </tr>
        <tr>
          <td></td>
          <td class="field_label left"><%= check_box 'event', 'instructional' %> Instructional</td>
        </tr>
        <tr>
          <td></td>
          <td class="field_label left"><%= check_box 'event', 'practice' %> Practice</td>
        </tr>
        <tr>
          <td class="field_label">Sponsoring Team:</td>
          <td><%= select('event', 'team_id', Team.find(:all).sort_by{|t| t.name}.collect {|t| [ t.name, t.id ] }, { :include_blank => true}) %></td>
        </tr>
        <tr>
          <td class="field_label">City:</td>
          <td><%= text_field 'event', 'city' %></td>
        </tr>
        <tr>
          <td class="field_label">State:</td>
          <td><%= text_field 'event', 'state' %></td>
        </tr>
      </table>
    </td>
    <td>
      <table>
        <tr>
          <td>
            <table class="base" id="inline">
              <tr>
                <th colspan="2">Promoter</th>
              </tr>
              <tr>
                <td class="field_label">Name:</td>
                <td><%= select("event", 
                         "promoter_id", 
                         Promoter.find(:all).sort_by{|p| p.name_or_contact_info}.collect {|p| [ p.name_or_contact_info, p.id ] }, 
                         { :include_blank => true}) %>
                    <%= observe_field(
                      'event_promoter_id', 
                      :url => {:action => 'promoter_changed', :id => @event.id}, :with => 'promoter_id',
                      :before => update_page {|page|
                                    page.visual_effect(:fade, 'promoter_email', :duration => 0.5)
                                    page.visual_effect(:fade, 'promoter_phone', :duration => 0.5)
                                    page.visual_effect(:fade, 'edit_promoter_link', :duration => 0.5)
                                  },
                      :success => evaluate_remote_response
                  ) %>
                </td>
              </tr>
              <tr>
                <td class="field_label">Email:</td>
                <td id="promoter_email"><%= event.promoter_email %></td>
              </tr>
              <tr>
                <td class="field_label">Phone:</td>
                <td id="promoter_phone"><%= event.promoter_phone %></td>
              </tr>
              <tr>
                <td></td>
                <td style="text-align: right;">
                  <span id="edit_promoter_link">
                  <%= link_to(
                        'Edit', 
                        :controller => 'promoters', 
                        :action => 'edit',
                        :id => @event.promoter.id,
                        :event_id => @event.id) if @event.promoter %>
                  </span>
                  &nbsp;<%= link_to(
                        'New', 
                        :controller => 'promoters', 
                        :action => 'new', 
                        :event_id => @event.id) %>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
  	<td>
  		&nbsp;
	</td>
  </tr>
  <tr>
    <td>
      <table>
{'fraction_non_alphanumeric': 0.18160317594391417, 'fraction_numerical': 0.0021961314300194272, 'mean_word_length': 1.284391279181941, 'pattern_counts': {'":': 0, '<': 383, '<?xml version=': 0, '>': 435, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6121288', 'n_tokens_mistral': 3881, 'n_tokens_neox': 3602, 'n_words': 708}