{% extends "bee_django_course/base.html" %}
{% load bootstrap_pagination %}
{% block content %}
    <table class="table">
        <thead>
        <tr>
            <th>用户</th>
            <th>课程</th>
            <th>设置</th>
            <th>作业</th>
            <th>录播</th>
        </tr>
        </thead>
        <tbody>
        {% for e in users %}
            <tr>
                <td>
                    {{ e.first_name | default:e.username }}
                </td>
                <td>
                    <a href="{% url 'bee_django_course:user_course' user_id=e.id %}">
                        查看课程
                    </a>
                </td>
                <td>
                    {% if perms.course.can_choose_course %}
                        <a href="{% url 'bee_django_course:choose_user_course' user_id=e.id %}">设置课程</a>
                    {% endif %}
                </td>
                <td>
                    <a href="{% url 'bee_django_course:manage_user_assignment_list' user_id=e.id %}">
                        查看作业
                    </a>
                </td>
                <td>
                    <a href="{% url 'bee_django_course:live_list' user_id=e.id %}">
                        查看录播
                    </a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    {% bootstrap_paginate users %}
{% endblock %}