{% load i18n sizeformat parse_date %}

<div class="detail">
  <dl class="dl-horizontal">
    <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>

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

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