<tr id="<%= dom_id(file) %>">
  <td>
    <%= file.filename %>
  </td>
  <td>
    <%= file.created_at %>
  </td>
  <td class="text-right">
    <div class="btn-group">
      <%= button_tag t(".manage"), class: "btn btn-light btn-sm dropdown-toggle border", data: { toggle: "dropdown", boundary: "window" }, aria: { haspopup: true, expanded: false } %>
      <div class="dropdown-menu dropdown-menu-right">
        <% if policy(Directory).download_file? %>
          <%= link_to fa_icon("download fw", text: "Download File"), file, class: "dropdown-item", target: "_blank" %>
        <% end %>
        <% if policy(Directory).destroy_file? %>
          <%= link_to fa_icon("trash fw", text: "Delete File"), [:destroy_file, @project, @directory, { file_id: file.id }], class: "dropdown-item", method: :delete, data: { confirm: "Are you sure?" } %>
        <% end %>
      </div>
    </div>
  </td>
</tr>
