<commit_before><div class="box event">
  <h3 class="conf-title">
    <div class="conflogo--medium"><%= event_image event %></div>
    <%= link_to event.name, event_path(id: event.id) %>
  </h3>

  <p><i class="icon-location"></i><%= event.location %></p>
  <p class="markdownize"><%= event.description %></p>
  <ul class="tags">
    <% event.tags.each do |tag| %>
      <li class="tag <%= tag.category.name.gsub(" ", "-") %>"><%= tag.name %></li>
    <% end %>
  </ul>
  <% if event.application_process == 'application_by_organizer' %>
    <%= button_to t('.apply_at', event_name: event.name), event.application_link, method: :get,
        class: "btn btn-save btn-external", disabled: event.closed? %>
  <% elsif current_user == nil || event.applications.find_by(applicant_id: current_user.id) == nil %>
    <%= button_to t('.apply'), new_event_application_path(event_id: event.id), method: :get,
        class: "btn btn-save", disabled: event.closed? %>
  <% else %>
  <% event.applications.find_by(applicant_id: current_user.id).submitted ? button_text = t('.your_application'): button_text = t('.your_draft') %>
    <%= button_to button_text,
        event_application_path(
        event_id: event.id,
        id: event.applications.find_by(applicant_id: current_user.id).id
        ),
        method: :get, class: "btn btn-save" %>
  <% end %>

  <% if event.closed? %>
    <span class="hint"><%= t('.application_deadline') %></span>
  <% end %>
</div><commit_msg>Add event_draft_path link in case button_text equals "Your draft"<commit_after><div class="box event">
  <h3 class="conf-title">
    <div class="conflogo--medium"><%= event_image event %></div>
    <%= link_to event.name, event_path(id: event.id) %>
  </h3>

  <p><i class="icon-location"></i><%= event.location %></p>
  <p class="markdownize"><%= event.description %></p>
  <ul class="tags">
    <% event.tags.each do |tag| %>
      <li class="tag <%= tag.category.name.gsub(" ", "-") %>"><%= tag.name %></li>
    <% end %>
  </ul>
  <% if event.application_process == 'application_by_organizer' %>
    <%= button_to t('.apply_at', event_name: event.name), event.application_link, method: :get,
        class: "btn btn-save btn-external", disabled: event.closed? %>
  <% elsif current_user == nil || event.applications.find_by(applicant_id: current_user.id) == nil %>
    <%= button_to t('.apply'), new_event_application_path(event_id: event.id), method: :get,
        class: "btn btn-save", disabled: event.closed? %>
  <% else %>
  <% event.applications.find_by(applicant_id: current_user.id).submitted ? button_text = t('.your_application'): button_text = t('.your_draft') %>
    <% if button_text == t('.your_application') %>
      <%= button_to button_text,
          event_application_path(
          event_id: event.id,
          id: event.applications.find_by(applicant_id: current_user.id).id
          ),
          method: :get, class: "btn btn-save" %>
    <% else %>
      <%= button_to button_text,
          event_draft_path(
          event_id: event.id,
          id: event.applications.find_by(applicant_id: current_user.id).id
          ),
          method: :get, class: "btn btn-save" %>
    <% end %>
  <% end %>

  <% if event.closed? %>
    <span class="hint"><%= t('.application_deadline') %></span>
  <% end %>
</div>
{'fraction_non_alphanumeric': 0.19444444444444445, 'fraction_numerical': 0.0012077294685990338, 'mean_word_length': 3.477027027027027, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, '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': '4875761', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1107, 'n_words': 219}