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

{% set menu = 'admin_v2_teacher_manage' %}

{% set script_controller = 'teacher/teacher-list' %}

{% block main %}
<form id="user-search-form" class="form-inline well well-sm" action="" method="get" novalidate>
  {% include 'org/org-tree-select.html.twig' with {orgCode: app.request.get('orgCode'), modal: 'list'} %}
  
  <div class="form-group">
    <input type="text" name="nickname" class="form-control" value="{{ app.request.query.get('nickname') }}" placeholder="{{'admin.user.teacher.fields.nickname.input_placeholder'|trans}}">
  </div>

  <button class="btn btn-primary">{{'admin.user.form.btn.search_submit_btn'|trans}}</button>

</form>
<table id="teacher-table" class="table table-striped table-hover" data-search-form="#user-search-form">
  <thead>
    <tr>
      <th>{{'user.fields.username_label'|trans}}</th>
      {% include 'org/parts/table-thead-tr.html.twig' %}
      <th width="30%" >{{'admin.user.teacher.basic_tab.fields.recommend_teacher_label'|trans}}</th>
      <th>{{'admin.user.teacher.basic_tab.fields.recent_login_label'|trans}}</th>
      <th>{{'admin.user.fields.operation_label'|trans}}</th>
    </tr>
  </thead>
  <tbody>
    {% if users %}
      {% for user in users %}
        {% include 'admin-v2/user/teacher/tr.html.twig' with {user:user} %}
      {% endfor %}
    {% else %}
       <tr><td colspan="20"><div class="empty">{{'admin.user.teacher.basic_tab.teacher_empty_hint'|trans}}</div></td></tr>
    {% endif %}
  </tbody>
</table>
 {{ admin_macro.paginator(paginator) }} 
{% endblock %}