Files
drl_2/xuexiao/templates/user_list.html
user9994793890 ee860ce0ae Initial commit
2026-05-29 10:28:07 +08:00

36 lines
1.7 KiB
HTML

{% extends "base.html" %}
{% block title %}用户管理 - 学生课程管理系统{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-3">
<h4><i class="bi bi-person-gear"></i> 用户管理</h4>
<a href="{{ url_for('user_add') }}" class="btn btn-primary"><i class="bi bi-plus-circle"></i> 新增用户</a>
</div>
<div class="card shadow-sm">
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover table-bordered">
<thead class="table-light">
<tr><th>ID</th><th>用户名</th><th>姓名</th><th>角色</th><th>电话</th><th>邮箱</th><th>状态</th><th>操作</th></tr>
</thead>
<tbody>
{% for u in users %}
<tr>
<td>{{ u.id }}</td>
<td>{{ u.username }}</td>
<td>{{ u.real_name }}</td>
<td><span class="badge bg-primary">{{ u.role.name if u.role else '-' }}</span></td>
<td>{{ u.phone or '-' }}</td>
<td>{{ u.email or '-' }}</td>
<td>{% if u.status == 1 %}<span class="badge bg-success">启用</span>{% else %}<span class="badge bg-secondary">禁用</span>{% endif %}</td>
<td>
<a href="{{ url_for('user_edit', user_id=u.id) }}" class="btn btn-sm btn-warning"><i class="bi bi-pencil"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}