{% load dict_key_extras %}

<table class="table table-bordered table-striped table-hover">
    <thead>
        {% if data.menu %}
            <th> <input type="checkbox" id="select_all_{{group}}" onchange="selectAll(this, '{{group}}')"> </th>
        {% endif %}
        <th>File name</th>
        <th>Upload date</th>
        {% if come_from_admin %}
            <th>User</th>
        {% endif %}
        <th>Actions</th>
    </thead>
    <tbody>
        {% for object in objects %}
            <tr class="{{ rowcolors }}" objectid="{{object.file.id}}">
                {% if data.menu %}
                <td id="actionCheckbox">
                    <input type="checkbox" id={{object.file.id}} name={{group}}>
                </td>
                {% endif %}
                <td>{{ object.file.filename }}</td>
                <td>{{ object.date }}</td>
                {% if come_from_admin %}
                    <td>
                        {{object.user}}
                    </td>
                {% endif %}
                <td>
                    <a class="btn btn-default download-{{data.document}}-btn" href="{{ object.url }}">
                        <i class="fa fa-list"></i> Download
                    </a>

                    <a class="btn btn-default delete-document-btn" objectid="{{ object.file.id }}">
                        <i class="fa fa-trash"></i> Delete
                    </a>

                </td>
            </tr>
        {% endfor %}
    </tbody>
</table>