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

{% block title %}教师管理 - {{ parent() }}{% endblock %}

{% set menu = 'teacher' %}

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

{% block main %}
<div class="page-header clearfix">
  <button class="btn btn-info btn-sm pull-right mls" id="add-navigation-btn" data-toggle="modal" data-target="#modal" data-url="{{path('admin_user_create',{type:'teacher'})}}" >添加</button>
  <a class="btn btn-info btn-sm pull-right" href="{{ path('admin_user_import_check',{type:'teacher'}) }}">导入</a>
  <h1 class="pull-left">教师管理</h1>
</div>
<form id="user-search-form" class="form-inline well well-sm" action="" method="get" novalidate>
    
  <div class="form-group">
    <input type="text" name="search_truename" class="form-control" value="{{ app.request.query.get('search_truename') }}" placeholder="姓名">
  </div>

  <div class="form-group">
    <input type="text" name="search_number" class="form-control" value="{{ app.request.query.get('search_number') }}" placeholder="工号">
  </div>

  <button class="btn btn-primary">搜索</button>
</form>

<table id="user-table" class="table table-striped table-hover teacher-table" data-search-form="#user-search-form">
  <thead>
    <tr>
      <th>工号</th>
      <th>姓名</th>
      <th>首页推荐</th>
      {# <th>Email</th> #}
      {# <th>注册时间</th> #}
      <th>最近登录</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>
    {% for user in users %}
      {% include 'TopxiaAdminBundle:Teacher:teacher-table-tr.html.twig' with {user:user} %}
    {% endfor %}
  </tbody>
</table>
 {{ web_macro.paginator(paginator) }} 
{% endblock %}
