{% set classroom = data('Classroom', {courseId: course.id}) %}
{% if classroom|default(null) %}
  <div class="panel panel-default belongs-class">
    <div class="panel-heading">
      <h3 class="panel-title"> <i class="es-icon es-icon-locallibrary"></i>
        {{'所属%name%'|trans({'%name%': setting('classroom.name')|default('班级'|trans)})}}
      </h3>
    </div>
    <div class="panel-body">
        <div class="media">
          <div class="media-left">
            <a href="{{ path('classroom_show', {id: classroom.id}) }}"><img src="{{ filepath(classroom.smallPicture, 'classroom.png') }}" alt=""></a>
          </div>
          <div class="media-body">
            <a href="{{ path('classroom_show', {id: classroom.id}) }}">{{ classroom.title }}</a>
          </div>
        </div>
    </div>
  </div>
{% endif %}