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

<div class="info row detail">
  <hr class="header_rule">
  <dl>
    <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 %}
      {% for rule in policy.rules %}
      {% url 'horizon:project:firewalls:ruledetails' rule.id as rule_url %}
      {{ rule.position }} : <a href="{{ rule_url }}">{{ rule.name|default:rule.id }}</a><br>
      {% endfor %}
      {% 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>
