{% load parse_date %}
{% load i18n %}

<table class="zebra-striped">
  <tr>
    <th>{% trans "ID"%}</th>
    <th>{% trans "Name"%}</th>
    <th>{% trans "Size"%}</th>
    <th>{% trans "Public"%}</th>
    <th>{% trans "Created"%}</th>
    <th>{% trans "Updated"%}</th>
    <th colspan="2">{% trans "Status"%}</th>
  </tr>
  {% for image in images %}
  <tr id="images" class="{% cycle 'odd' 'even' %}">
      <td>{{image.id}}</td>
      <td>{{image.name}}</td>
      <td>{{image.size|filesizeformat}}</td>
      <td>{{image.is_public}}</td>
      <td>{{image.created_at|parse_date}}</td>
      <td>{{image.updated_at|parse_date}}</td>
      <td>{{image.status|capfirst}}</td>
      <td id="actions">
        <ul>
          <li class="form">{% include "syspanel/images/_delete.html" with form=delete_form %}</li>
          {# <li class="form">{% include "syspanel/images/_toggle.html" with form=toggle_form %}</li> #}
          <li><a class="btn small" href="{% url horizon:syspanel:images:update image.id %}">{% trans "Edit"%}</a></li>
        </ul>
      </td>
  </tr>
  <tr class="details">
    <td class="properties" colspan="9">
      <ul>
        <li><span>{% trans "Location"%}: </span>{{image.properties.image_location}}</li>
        <li><span>{% trans "State"%}: </span>{{image.properties.image_state}}</li>
        <li><span>{% trans "Kernel ID"%}: </span>{{image.properties.kernel_id}}</li>
        <li><span>{% trans "Ramdisk ID"%}: </span>{{image.properties.ramdisk_id}}</li>
        <li><span>{% trans "Architecture"%}: </span>{{image.properties.architecture}}</li>
        <li><span>{% trans "Project ID"%}: </span>{{image.properties.project_id}}</li>
        <li><span>{% trans "Container Format"%}: </span>{{image.container_format}}</li>
        <li><span>{% trans "Disk Format"%}: </span>{{image.disk_format}}</li>
      </ul>
    </td>
  </tr>
  {% endfor %}
</table>
