{% load i18n %}
{% if can_view %}
    <div class="django-library-{{ library.id }}">
        {% for file in library.file_set.all %}
            <div class="row">
                <div class="col-8">
                    <h5>{{ file.name }}</h5>
                    <small>{{ file.description }}</small>
                </div>
                <div class="col-4">
                    <a class="btn btn-success"
                       href="{% url "django_library_download_file" file.id file.original_name %}" target="_blank"
                       download="{% url "django_library_download_file" file.id file.original_name %}">{% trans "Download" %}</a>
                    {% if can_add_edit %}
                        <a class="btn btn-danger"
                           href="{% url "django_library_delete_file" file.id %}?next_url={{ next_page|urlencode }}">{% trans "Delete" %}</a>
                    {% endif %}
                    {{ can_add_edit }}
                </div>
            </div>
        {% endfor %}
    </div>
{% endif %}