{% import "macro.html.twig" as web_macro %}
<tr id="student-{{ user.id }}-tr">
  <td class="media" style="vertical-align: middle;">
    {{ web_macro.user_avatar(user, 'pull-left', 'avatar-sm') }}
    <a target="_blank" href="{{ path('user_show', {id:user.id}) }}">{{ user.nickname }}</a>
    {% if student.remark %}
      <span class="color-gray text-sm" title="{{student.remark}}">({{ student.remark|plain_text(16) }})</span>
    {% endif %}
    <div class="color-gray text-sm">{{'加入时间'|trans}}：{{ student.createdTime|date('Y-n-d H:i') }}</div>
  </td>
  {#<td style="vertical-align: middle;">
    {% if role == 'student' %}
      <div class="progress mvm" title="{{'已学%number%课程'|trans({'%number%':progress.number})}}">
        <div class="progress-bar" style="width: {{ progress.percent }}" data-toggle="tooltip" data-placement="right" data-original-title="{{ progress.percent }}">
        </div>
      </div>
    {% endif %}
  </td>#}
  <td class="color-gray vertical-middle">
  {% if role == 'student' %}
    {{ progress.percent }}
  {% endif %}
  </td>
  <td style="vertical-align: middle;">
    <div class="btn-group">
      {% if app.user.id != user.id %}
        <a class="mr10 link-primary" data-toggle="modal" data-target="#modal" data-url="{{path('message_create', {toId:user.id})}}">{{'发私信'|trans}}</a>
      {% endif %}
      {% if app.user.isAdmin() %}
        <a class="mr10 link-primary" data-toggle="modal" data-target="#modal" data-url="{{path('course_set_manage_course_students_show', {courseSetId: 0, courseId:classroom.id, userId:user.id})}}">{{'查看资料'|trans}}</a>
      {% elseif setting("course.buy_fill_userinfo") %}
        <a class="mr10 link-primary" data-toggle="modal" data-target="#modal" data-url="{{path('course_set_manage_course_students_defined_show', {courseSetId: 0, courseId:classroom.id, userId:user.id}) }}">{{'查看资料'|trans}}</a>
      {% endif %}
      <a  class=" dropdown-toggle link-primary" href="javascript:;" type="button" data-toggle="dropdown">{{'管理'|trans}}
        <span class="caret ml5"></span>
      </a>
      <ul class="dropdown-menu pull-right">
        <li><a class="" href="" data-toggle="modal" data-target="#modal" data-url="{{path('classroom_manage_student_remark', {classroomId:classroom.id, userId:user.id})}}">{{'备注'|trans}}</a></li>
        <li><a class="student-remove" href="javascript:;" data-url="{{path('classroom_manage_student_remove', {classroomId:classroom.id, userId:user.id})}}" data-user="{{default.user_name|default('学员'|trans)}}">{{'移除'|trans}}</a></li>
        <li><a class="" href="" data-toggle="modal" data-target="#modal" data-url="{{path('classroom_manage_member_deadline', {classroomId:classroom.id, userId:user.id})}}">{{'修改有效期'|trans}}</a></li>
      </ul>
    </div>
  </td>
</tr>