horizon/horizon/horizon/dashboards/nova/templates/nova/images/_list.html

37 lines
1.3 KiB
HTML

{% load i18n %}
{% load parse_date %}
{% load launch_form %}
<table id="images" class="zebra-striped">
<tr>
<th>{%trans "ID"%}</th>
<th>{%trans "Name"%}</th>
<th>{%trans "Created"%}</th>
<th>{%trans "Updated"%}</th>
<th colspan="2">{%trans "Status"%}</th>
</tr>
{% for image in images %}
<tr class="{% cycle 'odd' 'even' %}">
<td>{{image.id}}</td>
<td>{{image.name}}</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>{{ image.request.user.id }}<a class="btn small primary" data-controls-modal="launch_image_{{image.id}}" data-backdrop="static" href="{% url horizon:nova:images:launch image.id %}">{% trans "Launch" %}</a></li>
{% if image.owner == request.user.tenant_id %}
<li class="form">{% include "nova/images/_delete.html" with form=delete_form %}</li>
<li><a class='btn small' href="{% url horizon:nova:images:update image.id %}">{% trans "Edit" %}</a></li>
{% endif %}
</ul>
</td>
</tr>
{% endfor %}
</table>
{% for image in images %}
{% launch_form request request.user.tenant_id image.id as launch_form %}
{% include 'nova/images/_launch.html' with form=launch_form image_id=image.id hide=True %}
{% endfor %}