{% extends 'admin/layout.html.twig' %}

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

{% set menu = 'admin_open_course_recommend_list' %}

{% block main %}
  
  {% include 'admin/open-course/course-search-form.html.twig' with {actionUrl:path('admin_open_course_recommend_list')} %}
  
  <table class="table table-striped table-hover mtl" id="course-recommend-table">
    <thead>
    <tr>
      <th>{{ 'admin.open_manage.recommend.seq_th'|trans }}</th>
      <th width="50%">{{ 'admin.open_manage.recommend.name_th'|trans }}</th>
      <th>{{ 'admin.open_manage.recommend.creator_th'|trans }}</th>
      <th>{{ 'admin.open_manage.recommend.time_th'|trans }}</th>
      <th>{{ 'admin.open_manage.recommend.operater_th'|trans }}</th>
    </tr>
    </thead>
    <tbody>
      {% for course in courses %}
        {% set user = users[course.userId]|default(null) %}
        {% set category = categories[course.categoryId]|default(null) %}
          {% include 'admin/course/course-recommend-tr.html.twig' %}
      {% else %}
        <tr><td colspan="20"><div class="empty">{{ 'admin.open_manage.recommend.empty'|trans }}</div></td></tr>
      {% endfor %}
    </tbody>
  </table>

  {{ admin_macro.paginator(paginator) }}

{% endblock %}