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

4 5
<i class="fa {% if d.is_downloading %}fa-refresh fa-spin{% else %}fa-file{% if d.failed %}" style="color: #d9534f;{% endif %}{% endif %}"></i>
{{ d.name }} (#{{ d.id }}) -
6
{% 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
{% if is_owner != False %}
14
<a href="{% url "dashboard.views.disk-remove" pk=d.pk %}?next={{ request.path }}"
15
  data-disk-pk="{{ d.pk }}" class="btn btn-xs btn-danger pull-right disk-remove"
16 17
  {% if not long_remove %}title="{% trans "Remove" %}"{% endif %}
  >
18
  <i class="fa fa-times"></i>{% if long_remove %} {% trans "Remove" %}{% endif %}
19
</a>
20
{% endif %}
21
<div style="clear: both;"></div>