{% spaceless %}
{% load i18n %}

{% if file_upload_type %}
  <div class="{{ class_prefix }}__display__file {% if not team_file_urls %}is--hidden{% endif %} submission__{{ file_upload_type }}__upload" data-upload-type="{{ file_upload_type }}">
        {% if team_file_urls %}
        <h5 class="submission__answer__part__text__title">
          {% trans "Files that were uploaded by your teammates:" %}
        </h5>
        {% endif %}

        <div class="submission__answer__files">
        {% for file in team_file_urls %}
            <div class="submission__answer__team__file__block submission__answer__team__file__block__{{ forloop.counter0 }}" {% if not file.download_url %} deleted {% endif %}>
            {% if file.download_url %}
                {% if file_upload_type == "image" %}
                    {% if file.description %}
                    <div class="submission__file__description__label" id="file_description_{{ xblock_id }}_{{ including_template }}_{{ forloop.counter0 }}">{{ file.description }}:</div>
                    {% endif %}
                    <div><img class="submission__answer__file submission--image" src="{{ file.download_url }}"
                            aria-labelledby="file_description_{{ xblock_id }}_{{ including_template }}_{{ forloop.counter0 }}" /></div>
                {% elif file_upload_type == "pdf-and-image" or file_upload_type == "custom" %}
                    <a href="{{ file.download_url }}" class="submission__answer__file submission--file" target="_blank">
                        {% if file.description %}
                        {{ file.description }} ( {{file.name}} )
                        {% else %}
                        {% trans "View the files associated with this submission:" %} #{{ forloop.counter }}
                        {% endif %}
                    </a>
                {% endif %}
                [{% trans "Uploaded by" %} <strong class="emphasis">{{ file.uploaded_by }}</strong>]
            {% endif %}
            </div>
        {% endfor %}
        </div>
    </div>
{% endif %}

{% endspaceless %}
