{% cache 'course-announcements-block/course/' ~ courseId 600 %}
  {% do script(['app/js/announcement/announcement-swiper-slide/index.js']) %}
  {% set announcements = data('CourseAnnouncements',{courseId:courseId, count:10}) %}
  {% if announcements %}
    <div class="alert alert-warning announcements aside-notice" role="alert">
      <div class="swiper-container">
        <div class="swiper-wrapper">
        {% for announcement in announcements %}
          <div class="swiper-slide">
            <a style="color:#ff5e06" class="alert-link" href="#modal" data-toggle="modal" data-url="{{ path('announcement_show', {id:announcement.id, targetType:'course', targetId:announcement.targetId}) }}" >
            <i class="es-icon es-icon-infooutline"></i>
            {{ announcement.content|sub_text(50)|default('<span class="text-warning">(请点击查看)</span>')|trans|raw }}</a>
          </div>
        {% endfor %}
        </div>
      </div>
    </div>
  {% endif %}
{% endcache %}






