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

4
<i class="{% if d.is_downloading %}icon-refresh icon-spin{% else %}icon-file{% if d.failed %}" style="color: #d9534f;{% endif %}{% endif %}"></i> 
5 6
{{ d.name }} (#{{ d.id }}) - 
{% if not d.is_downloading %}
7 8
  {% if not d.failed %}
    {% if d.size %}{{ d.size|filesize }}{% endif %}
9
  {% else %}
10
  <div class="label label-danger"{% if user.is_superuser %} title="{{ d.get_latest_activity_result }}"{% endif %}>{% trans "failed" %}</div>
11 12
  {% endif %}
{% else %}<span class="disk-list-disk-percentage" data-disk-pk="{{ d.pk }}">{{ d.get_download_percentage }}</span>%{% endif %}
13
<a href="{% url "dashboard.views.disk-remove" pk=d.pk %}?next={{ request.path }}" 
14 15 16 17
  data-disk-pk="{{ d.pk }}" class="btn btn-xs btn-danger pull-right disk-remove"
  {% if not long_remove %}title="{% trans "Remove" %}"{% endif %}
  >
  <i class="icon-remove"></i>{% if long_remove %} {% trans "Remove" %}{% endif %}
18 19
</a>
<div style="clear: both;"></div>