{% spaceless %}
{% load i18n %}

{% if file_upload_type %}
    {% if header %}
        <header class="{{ class_prefix }}__display__header">
            <h3 class="{{ class_prefix }}__display__title">
                {{ header }}
            </h3>
        </header>
    {% endif %}

    <div class="{{ class_prefix }}__display__file {% if not file_url %}is--hidden{% endif %}" id="submission__{{ file_upload_type }}__upload" data-upload-type="{{ file_upload_type }}">
        {% if file_upload_type == "image" %}
            <img id="submission__answer__file"
                 class="submission--image"
                 alt="{% trans "The image associated with this submission." %}"
                 src="{{ file_url }}" />
        {% elif file_upload_type == "pdf-and-image" or file_upload_type == "custom" %}
            <a href="{{ file_url }}" id="submission__answer__file" class="submission--file" target="_blank">
                {% trans "View the file associated with this submission." %}
            </a>
            {% if show_warning %}
                <p class="submission_file_warning">{% trans "(Caution: This file was uploaded by another course learner and has not been verified, screened, approved, reviewed, or endorsed by edX. If you decide to access it, you do so at your own risk.)" %}</p>
            {% endif %}
        {% endif %}
    </div>
{% endif %}

{% endspaceless %}
