{% load i18n sizeformat parse_date %}
{% load url from future %}

<h3>{% trans "Volume Backup Overview" %}: {{backup.display_name }}</h3>

<div class="info row-fluid detail">
  <h4>{% trans "Info" %}</h4>
  <hr class="header_rule">
  <dl>
    <dt>{% trans "Name" %}</dt>
    <dd>{{ backup.name }}</dd>
    <dt>{% trans "ID" %}</dt>
    <dd>{{ backup.id }}</dd>
    {% if backup.description %}
    <dt>{% trans "Description" %}</dt>
    <dd>{{ backup.description }}</dd>
    {% endif %}
    <dt>{% trans "Status" %}</dt>
    <dd>{{ backup.status|capfirst }}</dd>
    {% if volume %}
    <dt>{% trans "Volume" %}</dt>
    <dd>
      <a href="{% url 'horizon:project:volumes:volumes:detail' backup.volume_id %}">
        {{ volume.name }}
      </a>
    </dd>
    {% endif %}
  </dl>
</div>

<div class="specs row-fluid detail">
  <h4>{% trans "Specs" %}</h4>
  <hr class="header_rule">
  <dl>
    <dt>{% trans "Size" %}</dt>
    <dd>{{ backup.size }} {% trans "GB" %}</dd>
    <dt>{% trans "Created" %}</dt>
    <dd>{{ backup.created_at|parse_date }}</dd>
  </dl>
</div>


<div class="status row-fluid detail">
  <h4>{% trans "Metadata" %}</h4>
  <hr class="header_rule">
  <dl>
  {% for key, value in backup.metadata.items %}
    <dt>{{ key }}</dt>
    <dd>{{ value }}</dd>
  {% endfor %}
  </dl>
</div>
