<div class="card shadow-sm">
  <%= card_header text: "Task Details", close_action_path: [:admin, :task_requests] %>
  <div class="card-body">
    <div class="row">
      <div class="col-md-6 col-sm-12">
        <dl>
          <%= description_list_pair_for @task_request.project.account, :name, custom_label: "Account Name", append: ":" %>
          <%= description_list_pair_for @task_request.project, :name, custom_label: "Project Name", append: ":" %>
          <%= description_list_pair_for @task_request, :created_at, append: ":" %>
          <%= description_list_pair_for @task_request, :user_email, append: ":" %>
          <%= description_list_pair_for @task_request, :status, append: ":" %>
        </dl>
      </div>
      <div class="col-md-6 col-sm-12">
        <dl>
          <%= description_list_pair_for @task_request, :deadline, append: ":" %>
          <%= description_list_pair_for @task_request, :time_allowed, append: ":" %>
          <%= description_list_pair_for @task_request, :description, append: ":" %>
          <%= description_list_pair_for @task_request, :additional_notes, append: ":" %>
        </dl>
      </div>
      <div class="col-md-12">
        <h2 class="h6 mt-3">Files:</h2>
        <div class="pt-2 mx-n3">
          <table class="table table-striped tr-px-4 align-all-middle">
            <thead class="thead-light">
              <tr>
                <th>Filename</th>
                <th></th>
              </tr>
            </thead>
            <tbody id="task_requests">
              <% if @files.any? %>
                <%= render partial: "task_requests/file", collection: @files %>
              <% else %>
                <tr>
                  <td colspan="12" class="py-4 text-center text-muted"><%= t(".empty") %></td>
                </tr>
              <% end %>
            </tbody>
          </table>
          <div class="mt-4" id="task_requests_pagiantion">
            <%= will_paginate @files %>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
