{% extends 'user/layout.html.twig' %}
{% block title %}{{'在教%name%'|trans({'%name%':setting('classroom.name')|default('班级'|trans)})}}  - {{ parent() }}{% endblock %}
{% set pageNav = 'teaching' %}
{% block main %}
  {% if classrooms %}
    <div class="recommend-class-list row">
      {% for classroom in classrooms %}
        {% set teachers = classroom['teachers']|default(null) %}
        <div class="col-md-3 col-sm-6">
          <div class="class-item">
            <div class="class-img-wrap">
              <a class="class-img" href="{{ path('classroom_show', {id:classroom.id}) }}">
                <img class="img-responsive" src="{{ filepath(classroom.middlePicture, 'classroom.png') }}" alt="{{ classroom.title }}">
              </a>
            </div>
            <h3><a class="link-dark" href="{{ path('classroom_show', {id:classroom.id}) }}">{{ classroom.title }}</a></h3>
            <div class="metas">{{'共%classroom.courseNum%门课程'|trans({'%classroom.courseNum%':classroom.courseNum})}}</div>
          </div>
        </div>
      {% endfor %}
    </div>
  {% else %}
    <div class="empty">{{'暂无在教%name%'|trans({'%name%':setting('classroom.name')|default('班级'|trans)})}}</div>
  {% endif %}

  {{ web_macro.paginator(paginator) }}
{% endblock %}
