<commit_before><%= if length(@open_feedback_events) > 0 do %>
  <div class="card">
    <div class="card-header">
      Open feedbacks
    </div>
    <%= for event <- @open_feedback_events do %>
      <div class="card-block">
        <p><%= event.id %> <%= event.name %></p>
        <%= link "New feedback", to: classroom_feedback_path(@conn, :new, event), class: "btn btn-success" %>
      </div>
    <% end %>
  </div>
<% end %>

<div class="card">
  <%= if length(@feedbacks) == 0 do %>
    <div class="card-block text-xs-center">
      <h4 class="card-title">No feedbacks available</h4>
      <p class="card-text">Open your mind and extend your knowledges and skills.</p>
      <%= link "Discover events", to: page_path(@conn, :index), class: "btn btn-outline-primary" %>
    </div>
  <% else %>
    <table class="table">
      <tr>
        <th>Event</th>
        <th>Content rating</th>
        <th>Trainer rating</th>
        <th>Location rating</th>
        <th>Testimonial</th>
      </tr>
      <%= for feedback <- @feedbacks do %>
        <tr>
          <td><%= link feedback.event.name, to: classroom_feedback_path(@conn, :show, feedback.event) %></td>
          <td>
            <%= stars(feedback.content_rating) %>
            <br>
            <%= feedback.content_comment %>
          </td>
          <td>
            <%= stars(feedback.trainer_rating) %>
            <br>
            <%= feedback.trainer_comment %>
          </td>
          <td>
            <%= stars(feedback.location_rating) %>
            <br>
            <%= feedback.location_comment %>
          </td>
          <td><%= feedback.testimonial %></td>
        </tr>
      <% end %>
    </table>
  <% end %>
</div><commit_msg>refactor open feedbacks<commit_after><%= if length(@open_feedback_events) > 0 do %>
  <div class="card">
    <div class="card-header">
      Open feedbacks
    </div>
    <ul class="list-group list-group-flush">
    <%= for event <- @open_feedback_events do %>
      <li class="list-group-item">
        <div class="media">
          <div class="media-body">
            <strong><%= event.name %></strong>
            <br>
            <small>
              (<%= l(Calendar.DateTime.to_date(event.starts_at)) %> -
              <%= l(Calendar.DateTime.to_date(event.ends_at)) %>)
            </small>
          </div>
          <div class="media-right">
            <%= link "New feedback", to: classroom_feedback_path(@conn, :new, event), class: "btn btn-sm btn-outline-success" %>
          </div>
        </div>
      </li>
    <% end %>
    </ul>
  </div>
<% end %>

<div class="card">
  <%= if length(@feedbacks) == 0 do %>
    <div class="card-block text-xs-center">
      <h4 class="card-title">No feedbacks available</h4>
      <p class="card-text">Open your mind and extend your knowledges and skills.</p>
      <%= link "Discover events", to: page_path(@conn, :index), class: "btn btn-outline-primary" %>
    </div>
  <% else %>
    <table class="table">
      <tr>
        <th>Event</th>
        <th>Content rating</th>
        <th>Trainer rating</th>
        <th>Location rating</th>
        <th>Testimonial</th>
      </tr>
      <%= for feedback <- @feedbacks do %>
        <tr>
          <td><%= link feedback.event.name, to: classroom_feedback_path(@conn, :show, feedback.event) %></td>
          <td>
            <%= stars(feedback.content_rating) %>
            <br>
            <%= feedback.content_comment %>
          </td>
          <td>
            <%= stars(feedback.trainer_rating) %>
            <br>
            <%= feedback.trainer_comment %>
          </td>
          <td>
            <%= stars(feedback.location_rating) %>
            <br>
            <%= feedback.location_comment %>
          </td>
          <td><%= feedback.testimonial %></td>
        </tr>
      <% end %>
    </table>
  <% end %>
</div>
{'fraction_non_alphanumeric': 0.18238503507404522, 'fraction_numerical': 0.0020784619381657575, 'mean_word_length': 1.9411764705882353, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 0, '>': 149, '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': '6430620', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1215, 'n_words': 255}