{% extends 'activity/content-layout.html.twig' %}

{% do script(['libs/perfect-scrollbar.js','app/js/activity/download/index.js']) %}

{% block body %}
  <div class="iframe-parent-content iframe-parent-full" id="download-activity">
    <ul class="download-activity-list">
      {% for material in materials %}
        <li>
          <a class="link-darker" data-file-id="{{ material.id }}"
             data-url="{{ path('course_activity_download', {courseId:activity.fromCourseId, activityId:material.lessonId , materialId:material.id }) }}"
             target="_blank">{{ material.title }}
            {% if material.link|default(null) %}
              (link)
            {% else %}
              ({{ material.fileSize|file_size }})
            {% endif %}
            <i class="es-icon es-icon-filedownload download-icon"></i>
            <div class="text-xs color-gray mts">{{ material.description|default('') }}</div>
          </a>
        </li>
      {% endfor %}
    </ul>
  </div>
{% endblock %}