{% load i18n sizeformat parse_date %}

<div class="row">
  <dl class="dl-horizontal">
    <dt>{% trans "Name" %}</dt>
    <dd>{{ share_network.name }}</dd>
    {% if share_network.description %}
      <dt>{% trans "Description" %}</dt>
      <dd>{{ share_network.description }}</dd>
    {% endif %}
    {% if share_network.created_at %}
      <dt>{% trans "Created At" %}</dt>
      <dd>{{ share_network.created_at }}</dd>
    {% endif %}
    {% if share_network.updated_at %}
      <dt>{% trans "Updated At" %} </dt>
      <dd>{{ share_network.updated_at }}</dd>
    {% endif %}
    <dt>{% trans "Share Network ID" %}</dt>
    <dd>{{ share_network.id }}</dd>
    <dt>{% trans "Project ID" %}</dt>
    <dd>{{ share_network.project_id }}</dd>
  </dl>
</div>
<div class="detail">
  <h4>{% trans "Subnets" %}</h4>
  <hr class="header_rule">
  <dl class="dl-horizontal">
    <dl class="dl-horizontal">
      {% for subnet in share_network.share_network_subnets %}
      <dl class="dl-horizontal">
        <dt>{% trans "Id" %}</dt>
        <dd>
          {{subnet.id}}
        </dd>
        {% if subnet.neutron_net != "Unknown" %}
  {% url 'horizon:admin:networks:detail' subnet.neutron_net_id as network_detail_url %}
          <dt>{% trans "Neutron Network" %}</dt>
          <dd>
            <a href="{{ network_detail_url }}">{{subnet.neutron_net}}</a>
          </dd>
        {% endif %}
        {% if subnet.neutron_subnet != "Unknown" %}
  {% url 'horizon:admin:networks:subnets:detail' subnet.neutron_subnet_id as subnet_detail_url %}
          <dt>{% trans "Neutron Subnet" %}</dt>
          <dd>
            <a href="{{ subnet_detail_url }}">{{subnet.neutron_subnet}}</a>
          </dd>
        {% endif %}
        <dt>{% trans "Availability Zone" %}</dt>
        <dd>
          {{subnet.availability_zone}}
        </dd>
      </dl>
      {% endfor %}
    </dl>
  </dl>
</div>
{% if share_network.share_servers %}
  <div class="detail">
    <h4>{% trans "Share Servers" %}</h4>
    <hr class="header_rule">
    <dl class="dl-horizontal">
      {% for server in share_network.share_servers %}
        <ul>
{% url 'horizon:admin:share_servers:share_server_detail' server.id as server_url %}
          <li><a href="{{ server_url }}">{{server.id }}</a></li>
        </ul>
      {% endfor %}
    </dl>
  </div>
{% endif %}
{% if share_network.sec_services %}
  <div class="detail">
    <h4>{% trans "Security Services" %}</h4>
    <hr class="header_rule">
    {% for sec_service in share_network.sec_services %}
{% url 'horizon:admin:security_services:security_service_detail' sec_service.id as sec_service_url%}
      <dl class="dl-horizontal">
        <dt>{% trans "Id" %}</dt>
        <dd><a href="{{ sec_service_url }}">{{ sec_service.id }}</a></dd>
        <dt>{% trans "Name" %}</dt>
        <dd><a href="{{ sec_service_url }}">{{ sec_service.name }}</a></dd>
        <dt>{% trans "Type" %}</dt>
        <dd>{{ sec_service.type }}</dd>
      </dl>
      <br />
    {% endfor %}
  </div>
{% endif %}
