{% load i18n sizeformat parse_date %}

<div class="detail">
  <dl class="dl-horizontal">
    <dt>{% trans "Name" %}</dt>
    <dd>{{ policy.name|default:_("-") }}</dd>

    <dt>{% trans "Description" %}</dt>
    <dd>{{ policy.description|default:_("-") }}</dd>

    <dt>{% trans "ID" %}</dt>
    <dd>{{ policy.id }}</dd>

    <dt>{% trans "Project ID" %}</dt>
    <dd>{{ policy.tenant_id }}</dd>

    <dt>{% trans "Rules" %}</dt>
    <dd>
      {% if policy.rules %}
      <ol>
      {% for rule in policy.rules %}
      {% url 'horizon:project:firewalls_v2:ruledetails' rule.id as rule_url %}
      <li><a href="{{ rule_url }}">{{ rule.name|default:rule.id }}</a></li>
      {% endfor %}
      </ol>
      {% else %}
      {% trans "-" %}
      {% endif %}
    </dd>

    <dt>{% trans "Shared" %}</dt>
    <dd>{{ policy.shared|yesno|capfirst }}</dd>

    <dt>{% trans "Audited" %}</dt>
    <dd>{{ policy.audited|yesno|capfirst }}</dd>
  </dl>
</div>
