{% extends "bee_django_user/base.html" %}
{% load bee_django_user_filter %}
{% block content %}
    {% include 'bee_django_user/logo.html' %}
    {% include 'bee_django_user/nav.html' %}
    {% include 'bee_django_user/messages.html' %}
    <h4>学生详情</h4>
    {% if perms.user.change %}
        <a href="{% url 'bee_django_user:user_update'  user.id %}">修改</a>
    {% endif %}
    <table class="table">
        <tr>
            <td class="col-xs-3">姓名</td>
            <td>{{ user.first_name }}</td>
        </tr>
        <tr>
            <td class="col-xs-3">用户名</td>
            <td>{{ user.username }}</td>
        </tr>
        <tr>
            <td class="col-xs-3">用户组</td>
            <td>{% for group in user.groups.all %}{{ group.name }}{% if not forloop.last %} /
            {% endif %}{% endfor %}
            {% if perms.user.can_change_group %}
        <a href="{% url 'bee_django_user:user_group_update'  user.id %}">修改</a>
    {% endif %}
            </td>
        </tr>
        <tr>
            <td>班级</td>
            <td>{{ user.userprofile.user_class|default:'' }}</td>
        </tr>
<tr>
            <td>助教</td>
            <td>{{ user.userprofile.user_class.assistant.first_name|default:'' }}</td>
        </tr>
        <tr>
            <td>直播间id</td>
            <td>{{ user.userprofile.room_id|default:'' }}</td>
        </tr>


    </table>
{% endblock %}