_disk-list-element.html 1.29 KB
Newer Older
1 2 3
{% load i18n %}
{% load sizefieldtags %}

4
<i class="fa fa-file"></i>
5
{{ d.name }} (#{{ d.id }}) - {{ d.size|filesize }}
6

7 8

<span class="operation-wrapper pull-right">
9 10 11 12 13 14 15 16 17 18 19 20
  {% if d.is_resizable %}
    {% if op.resize_disk %}
      <a href="{{ op.resize_disk.get_url }}?disk={{d.pk}}"
        class="btn btn-xs btn-{{ op.resize_disk.effect }} operation disk-resize-btn
        {% if op.resize_disk.disabled %}disabled{% endif %}">
        <i class="fa fa-{{ op.resize_disk.icon }} fa-fw-12"></i> {% trans "Resize" %}
      </a>
    {% else %}
      <a href="{% url "request.views.request-resize" vm_pk=instance.pk disk_pk=d.pk %}" class="btn btn-xs btn-primary operation">
        <i class="fa fa-arrows-alt fa-fw-12"></i> {% trans "Request resize" %}
      </a>
    {% endif %}
21 22 23 24 25 26 27 28 29
  {% endif %}
  {% if op.remove_disk %}
    <a href="{{ op.remove_disk.get_url }}?disk={{d.pk}}"
      class="btn btn-xs btn-{{ op.remove_disk.effect}} operation disk-remove-btn
      {% if op.remove_disk.disabled %}disabled{% endif %}">
      <i class="fa fa-{{ op.remove_disk.icon }} fa-fw-12"></i> {% trans "Remove" %}
    </a>
  {% endif %}
</span>
30
<div style="clear: both;"></div>
31 32

{% if request.user.is_superuser %}
33 34
  <small>{% trans "File name" %}: {{ d.filename }}</small><br/>
  <small>{% trans "Bus" %}: {{ d.device_bus }}</small>
35
{% endif %}