{% extends "base.html" %}

{% block content %}
  {% include "files/_partials/breadcrumb.html" %}

  <table class="inventory-table">
    <tr>
      <th>Name:</th>
      <th>Size:</th>
      <th>Last modified:</th>
    </tr>
    {% for directory in object.children.all %}
      <tr>
        <td><a href="{% url 'directory-detail' directory.slug %}"><i class="fa fa-folder"></i> {{ directory.name }}</a></td>
        <td class="meta">{{ directory.size|filesizeformat }}</td>
        <td class="meta">{{ directory.modified_time|timesince }}</td>
      </tr>
    {% endfor %}
    {% for file in object.files.all %}
      <tr>
        <td><a href="{% url 'file-detail' file.slug %}"><i class="fa fa-{{ file.fa_icon }}"></i> {{ file.name }}</a></td>
        <td class="meta">{{ file.size|filesizeformat }}</td>
        <td class="meta">{{ file.modified_time|timesince }}</td>
      </tr>
    {% endfor %}
  </table>
{% endblock %}

{% extends "base.html" %}

{% block content %}
  {% include "files/_partials/breadcrumb.html" %}

  <table class="inventory-table">
    <tr>
      <th colspan="2">Name:</th>
      <th>Size:</th>
      <th>Last modified:</th>
    </tr>
    {% for directory in object.children.all %}
      <tr>
        <td colspan="2"><a href="{% url 'directory-detail' directory.slug %}"><i class="fa fa-folder"></i> {{ directory.name }}</a></td>
        <td class="meta">{{ directory.size|filesizeformat }}</td>
        <td class="meta">{{ directory.modified_time|timesince }}</td>
      </tr>
    {% endfor %}
    {% for file in object.files.all %}
      <tr>
        <td>
          <a href="{% url 'file-detail' file.slug %}"><i class="fa fa-{{ file.fa_icon }}"></i> {{ file.name }}</a>
        </td>
        <td>
          <a href="{% url 'file-download' file.slug %}"><i class="fa fa-download"></i></a>
        </td>
        <td class="meta">{{ file.size|filesizeformat }}</td>
        <td class="meta">{{ file.modified_time|timesince }}</td>
      </tr>
    {% endfor %}
  </table>
{% endblock %}

Add download link to file list
Add download link to file list
