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

<div class="panel panel-default">
  <div class="panel-heading">
5 6
    <span class="btn btn-default btn-xs infobtn pull-right store-action-button" 
      title="{% trans "A list of your most recent files." %}">
7
      <i class="fa fa-info-circle"></i>
Kálmán Viktor committed
8
    </span>
9 10 11 12 13 14 15 16
    <span class="btn btn-default btn-xs infobtn pull-right" 
      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
17 18
    </h3>
  </div>
19
  <div class="list-group" id="dashboard-files-toplist">
20
    {% for t in files.toplist %}
Kálmán Viktor committed
21 22
    {% if t.TYPE == "F" %}
      <div class="list-group-item">
23
        <i class="fa fa-{{ t.icon }} dashboard-toplist-icon"></i> 
24 25 26
        <div class="store-list-item-name">
          {{ t.NAME }}
        </div>
Kálmán Viktor committed
27 28
        <a href="{% url "dashboard.views.store-download" %}?path={{ t.path }}" 
          class="pull-right btn btn-xs" style="color: black;">
29
          <i class="fa fa-cloud-download" title="{% trans "Download" %}"></i>
Kálmán Viktor committed
30
        </a>
31 32
        <a href="{% url "dashboard.views.store-list" %}?directory={{ t.directory }}" 
          class="pull-right btn btn-xs" style="color: black;">
33
          <i class="fa fa-folder-open" title="{% trans "Show in directory" %}"></i>
34
        </a>
35
        <div style="clear: both;"></div> 
Kálmán Viktor committed
36 37
      </div>
    {% else %}
38 39
    <a href="{% url "dashboard.views.store-list" %}?directory={{ t.path }}" 
      class="list-group-item">
40
      <i class="fa fa-{{ t.icon }} dashboard-toplist-icon"></i>
41 42 43 44
        <div class="store-list-item-name">
        {{ t.NAME }}
      </div>
      <div style="clear: both;"></div>
Kálmán Viktor committed
45 46 47
    </a>
    {% endif %}
    {% endfor %}
48
    <div class="list-group-item text-right no-hover">
Kálmán Viktor committed
49 50 51
      <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" %}"/>
52
          <i class="fa fa-refresh"></i>
Kálmán Viktor committed
53 54 55
        </button>
      </form>
      <a href="{% url "dashboard.views.store-list" %}" class="btn btn-primary btn-xs">
56
        <i class="fa fa-chevron-circle-right"></i> {% trans "show my files" %}
Kálmán Viktor committed
57 58
      </a>
      <a href="{% url "dashboard.views.store-upload" %}" class="btn btn-success btn-xs">
59
        <i class="fa fa-cloud-upload"></i> {% trans "upload" %}
Kálmán Viktor committed
60 61 62 63
      </a>
    </div>
  </div>
</div>