{% extends 'xprez/contents/base.html' %}
{% load thumbnail %}
{% load i18n %}

{% block css_class_extra %}xprez-download js-content-{{ content.pk }}{% endblock %}

{% block content_in %}
    <h3>{{ content.title|default:"Files" }}</h3>
    {% for att in content.attachments.all %}
        <div class="xprez-download-item">
            <div class="xprez-download-btn">
                <a href="{{ att.file.url }}" class="btn btn-secondary btn-download" download="{{ att.get_name }}{% if att.get_extension %}.{{ att.get_extension }}{% endif %}">{% trans 'Download' %} {{ att.get_extension }}</a>
            </div>
            <div class="xprez-download-item-name">{{ att.get_name }}</div>
        </div>
    {% endfor %}
{% endblock %}
