{% extends 'TopxiaAdminBundle::layout.html.twig' %}

{% set menu = 'admin_live_course' %}

{% block main %}

{% if setting("course.live_course_enabled") == 1 %}

  
  {% include 'TopxiaAdminBundle:LiveCourse:tab.html.twig' %}
  <br>

  <table class="table table-striped table-hover mtl" id="course-table">
    <thead>
    <tr>
      <th width="50%">课时</th>
      <th>直播时间</th>
      <th>最大参与人数</th>
      <th><a href="{{ path('admin_live_course', {status:status}) }}"><span class="glyphicon glyphicon-refresh"></span></a></th>
    </tr>
    </thead>
    <tbody>
      {% for lesson in lessons %}
        {% set course = courses[lesson.courseId]|default(null) %}
        {% include 'TopxiaAdminBundle:LiveCourse:tr.html.twig' %}
      {% else %}
        <tr><td colspan="20"><div class="empty">暂无进行中的直播</div></td></tr>
      {% endfor %}
    </tbody>
  </table>

  {{ web_macro.paginator(paginator) }}
{% else %}
<div class="well" style="text-align:center;">


直播功能未开启，请先在<a href="{{ path('admin_setting_live_course_setting') }}"> 系统-课程设置-直播 </a>中设置开启

</div>
{% endif %}
{% endblock %}