37 lines
1.7 KiB
HTML
37 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-workspace"></i> 老师管理</h4>
|
||
|
|
<div>
|
||
|
|
<a href="{{ url_for('teacher_add') }}" class="btn btn-primary"><i class="bi bi-plus-circle"></i> 新增老师</a>
|
||
|
|
{% if current_user.has_permission('teacher_export') %}<a href="{{ url_for('teacher_export') }}" class="btn btn-success"><i class="bi bi-download"></i> 导出Excel</a>{% endif %}
|
||
|
|
</div>
|
||
|
|
</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></tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{% for t in teachers %}
|
||
|
|
<tr>
|
||
|
|
<td>{{ t.id }}</td>
|
||
|
|
<td>{{ t.name }}</td>
|
||
|
|
<td>{{ t.phone or '-' }}</td>
|
||
|
|
<td>{{ t.specialty or '-' }}</td>
|
||
|
|
<td>{% if t.status == 1 %}<span class="badge bg-success">在职</span>{% else %}<span class="badge bg-secondary">离职</span>{% endif %}</td>
|
||
|
|
<td>
|
||
|
|
<a href="{{ url_for('teacher_edit', id=t.id) }}" class="btn btn-sm btn-warning"><i class="bi bi-pencil"></i></a>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|