{% extends "report_base.html" %}

{% block content %}

<div class="alert alert-secondary">

  {% include "report_buttons.html" %}

  <strong>Report: Largest AIPs</strong>
  <br>
  <strong>Storage Service:</strong> {{ storage_service_name }}
  <br>
  {% if storage_location_description %}
    <strong>Location:</strong> {{ storage_location_description }}
    <br>
  {% endif %}
  <strong>Start date:</strong> {{ start_date.strftime('%Y-%m-%d') }}
  <br>
  <strong>End date:</strong> {{ end_date.strftime('%Y-%m-%d') }}
  <br>

</div>

{% if aips %}
  <table id="largest-aips" class="table table-striped table-bordered">
  	<thead>
      <tr>
      {% for column in columns %}
        <th>{{ column }}</th>
      {% endfor %}
      </tr>
    </thead>
    <tbody>
      {% for aip in aips %}
        <tr> 
          <td>{{ aip["Name"] }}</td>
          <td>{{ aip["UUID"] }}</td>
          <td>{{ aip["Size"] | filesizeformat }}</td>
          <td>{{ aip["FileCount"] }}
      {% endfor %}
    </tbody>
  </table>
{% else %}
  <p class="h4" style="margin-top:20px;">No AIPs to display.</p>
{% endif %}

</div>

{% endblock %}
