<% if video_release_confirmations.any? %>
  <div class="table-responsive">
    <table class="table-striped table-sm w-100" style="table-layout: fixed;">
      <thead>
      <tr>
        <th style="width: 5%;"></th>
        <th style="">EDL #</th>
        <th style="">EDL TC</th>
        <th style="">VID TC</th>
        <th style="">Name</th>
        <th style="">Photo</th>
        <th style="width: 10%;"></th>
      </tr>
      </thead>
      <tbody>
      <% video_release_confirmations.group_by(&:releasable_type).each do |group, confirmations| %>
        <% confirmations.sort_by(&:appears_at).each do |confirmation| %>
          <tr id="<%= dom_id(confirmation) %>" data-releasable-id="<%= confirmation.releasable_id %>">
            <td></td>
            <td></td>
            <td><%= confirmation.timecode_in %></td>
            <td><a data-behavior="seekable-timecode"><%= confirmation.appears_at %></a></td>
            <td><%= confirmation.releasable.name %></td>
            <td>
              <% if confirmation.file_info.present? %>
                <%= confirmation.file_info.filename %></div>
              <% elsif confirmation.releasable.respond_to?(:photo) && confirmation.releasable.photo.attached? %>
                <%= image_tag thumbnail_variant(confirmation.releasable.photo), class: "img-fluid figure-img" %>
              <% else %>
                No Photo
              <% end %>
            </td>
            <td>
              <%= link_to polymorphic_path([confirmation.video, confirmation.releasable, confirmation]), class: "btn btn-danger btn-sm", data: { toggle: "tooltip", template: tooltip_template(css_class: "tooltip-danger") }, method: :delete, remote: true do %>
                <%= fa_icon("trash fw") %>
              <% end %>
            </td>
          </tr>
        <% end %>
      <% end %>
      </tbody>
    </table>
  </div>
<% else %>
  <div class="card-body">
    <div class="text-center text-muted py-2">
      Releases that have been added to the report will appear here
    </div>
  </div>
<% end %>
