{% load i18n %}
<table id="floating_ips" class="zebra-striped">
  <tr>
    <th>IP</th>
    <th>Instance</th>
    <th>Actions</th>
  </tr>
  {% for ip in floating_ips %}
  <tr class="{% cycle 'odd' 'even' %}">
    <td>{{ ip.ip }}</td>
    <td>
      {% if ip.fixed_ip %}
        <ul>
          <li><span>{% trans "Instance ID:" %}</span> {{ ip.instance_id }}</li>
          <li><span>{% trans "Fixed IP:" %}</span> {{ ip.fixed_ip }}</li>
        </ul>
      {% else %}
        None
      {% endif %}
    </td>

    <td id="actions">
      <ul>
        <li class="form">{% include "nova/floating_ips/_release.html" with form=release_form %}</li>
        {% if ip.fixed_ip %}
        <li class="form">{% include "nova/floating_ips/_disassociate.html" with form=disassociate_form %}</li>
        {% else %}
          <li class="form"><a class="btn small ajax-modal" href="{% url horizon:nova:floating_ips:associate ip.id %}">{%trans "Associate to instance"%}</a></li>
        {% endif %}
      </ul>
    </td>
  </tr>
  {% endfor %}
</table>
