index-files.html 2.97 KB
Newer Older
Kálmán Viktor committed
1 2 3 4
{% load i18n %}

<div class="panel panel-default">
  <div class="panel-heading">
5
    <span class="btn btn-default btn-xs infobtn pull-right store-action-button" 
6 7
      title="{% trans "A list of your most recent files." %}"
      data-container="body">
8
      <i class="fa fa-info-circle"></i>
Kálmán Viktor committed
9
    </span>
10
    <span class="btn btn-default btn-xs pull-right" data-container="body"
11 12 13 14 15 16 17
      title="
      {% blocktrans with used=files.quota.readable_used soft=files.quota.readable_soft hard=files.quota.readable_hard %}
      You are currently using {{ used }}, your soft limit is {{ soft }}, your hard limit is {{ hard }}.
      {% endblocktrans %}">
      <i class="fa fa-adjust"></i>
    </span>
    <h3 class="no-margin"><i class="fa fa-briefcase"></i> {% trans "Files" %}
Kálmán Viktor committed
18 19
    </h3>
  </div>
Kálmán Viktor committed
20 21
  <div class="list-group">
    <div id="dashboard-files-toplist">
22
    {% for t in files.toplist %}
Kálmán Viktor committed
23
    {% if t.TYPE == "F" %}
24 25
      <div class="list-group-item
        {% if forloop.last and files.toplist|length < 5 %}list-group-item-last{% endif %}">
26
        <i class="fa fa-{{ t.icon }} dashboard-toplist-icon"></i> 
27 28 29
        <div class="store-list-item-name">
          {{ t.NAME }}
        </div>
Kálmán Viktor committed
30 31
        <a href="{% url "dashboard.views.store-download" %}?path={{ t.path }}" 
          class="pull-right btn btn-xs" style="color: black;">
32
          <i class="fa fa-cloud-download" title="{% trans "Download" %}"></i>
Kálmán Viktor committed
33
        </a>
34 35
        <a href="{% url "dashboard.views.store-list" %}?directory={{ t.directory }}" 
          class="pull-right btn btn-xs" style="color: black;">
36
          <i class="fa fa-folder-open" title="{% trans "Show in directory" %}"></i>
37
        </a>
38
        <div style="clear: both;"></div> 
Kálmán Viktor committed
39 40
      </div>
    {% else %}
41
    <a href="{% url "dashboard.views.store-list" %}?directory={{ t.path }}" 
42 43
      class="list-group-item
      {% if forloop.last and files.toplist|length < 5 %}list-group-item-last{% endif %}">
44
      <i class="fa fa-{{ t.icon }} dashboard-toplist-icon"></i>
45 46 47 48
        <div class="store-list-item-name">
        {{ t.NAME }}
      </div>
      <div style="clear: both;"></div>
Kálmán Viktor committed
49 50
    </a>
    {% endif %}
Kálmán Viktor committed
51 52 53 54
    {% empty %}
      <div class="list-group-item list-group-item-last no-hover">
        {% trans "Your toplist is empty, upload something." %}
      </div>
Kálmán Viktor committed
55
    {% endfor %}
Kálmán Viktor committed
56
  </div>
57
    <div class="list-group-item text-right no-hover">
Kálmán Viktor committed
58 59 60
      <form class="pull-left" method="POST" action="{% url "dashboard.views.store-refresh-toplist" %}">
        {% csrf_token %}
        <button class="btn btn-success btn-xs" type="submit" title="{% trans "Refresh" %}"/>
61
          <i class="fa fa-refresh"></i>
Kálmán Viktor committed
62 63 64
        </button>
      </form>
      <a href="{% url "dashboard.views.store-list" %}" class="btn btn-primary btn-xs">
65
        <i class="fa fa-chevron-circle-right"></i> {% trans "show my files" %}
Kálmán Viktor committed
66 67
      </a>
      <a href="{% url "dashboard.views.store-upload" %}" class="btn btn-success btn-xs">
68
        <i class="fa fa-cloud-upload"></i> {% trans "upload" %}
Kálmán Viktor committed
69 70 71 72
      </a>
    </div>
  </div>
</div>