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

{% block title %}课程推荐列表 - {{ parent() }}{% endblock %}

{% set script_controller = 'course/recommend-list' %}

{% set menu = 'course-recommend-list' %}

{% block main %}
  <div class="page-header">
    <h1>课程推荐列表</h1>
  </div>

  <table class="table table-striped table-hover" id="course-recommend-table">
    <thead>
    <tr>
      <th>顺序号</th>
      <th width="50%">课程名称</th>
      <th>创建者</th>
      <th>推荐时间</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
      {% for course in courses %}
        {% set user = users[course.userId]|default(null) %}
        {% set category = categories[course.categoryId]|default(null) %}
        {% include 'TopxiaAdminBundle:Course:course-recommend-tr.html.twig' %}
      {% else %}
        <tr><td colspan="20"><div class="empty">暂无推荐课程</div></td></tr>
      {% endfor %}
    </tbody>
  </table>

  {{ web_macro.paginator(paginator) }}

{% endblock %}