<h5 class="card-title">List of documents</h5>

<!-- File results -->
<div
    class="table-responsive overflow-auto"
>
    <table
        class="table table-hover"
    >
        <thead>
            <tr>
                <th scope="col">
                    Name
                </th>
                <th scope="col">Created by
                </th>
                <th scope="col">Last modified
                </th>
                <th scope="col">File size</th>
            </tr>
        </thead>
        <tbody
        >
        
            <!-- Files -->
            {% if files %}
                {% for file in files %}
                <tr 
                    class="file-row"
                    >
                    <td>
                        <i class="bi bi-filetype-{{ file.file_extension }}" style="font-size:20"></i>
                        <a href="{{ file.file.url }}">&nbsp;&nbsp;{{ file.name }}</a>
                    </td>
                    <td>{{ file.created_by }}</td>
                    <td>{{ file.datetime_updated | date:request.user.datetime_view_preference }}</td>
                    <td>{{ file.size_str }}</td>
                </tr>
                {% endfor %}
            {% else %}
                <tr>
                    <td colspan="6">No files found</td>
                </tr>
            {% endif %}
            <!-- End files -->
        </tbody>
    </table>
</div>
<!-- End file results -->


