{% extends 'TopxiaAdminBundle:School:layout.html.twig' %}
{% block title %}学生管理 - {{ parent() }}{% endblock %}

{% set menu = 'classSetting' %}

{% set script_controller = 'school/student-list' %}

{% block main %}

<button class="btn btn-info btn-sm pull-right" id="add-navigation-btn" data-toggle="modal" data-target="#modal" data-url="{{path('admin_school_class_student_import',{ classId:class.id })}}" >添加学生</button>
<div class="page-header clearfix">
  <h1 class="pull-left">学生管理
    <small class="text-success">
      {{ class_name(class) }}
      {{ class.year}}届
      {% if class.term == 'first' %}
        一学期  
      {% else %}
        二学期
      {% endif %}
    </small>    
  </h1>

</div>
<table id="user-table" class="table table-striped table-hover" data-search-form="#user-search-form">
  <thead>
  </thead>
  <tbody>
    {% for user in users %}
      {% include 'TopxiaAdminBundle:School:student-list-item.html.twig' with {user:user} %}
    {% else %}
      <div class="empty">该班级暂无学生，快去添加学生吧！</div>
    {% endfor %}
  </tbody>
</table>
 {{ web_macro.paginator(paginator) }} 
{% endblock %}
