Initial commit
This commit is contained in:
48
xuexiao/templates/attendance_select.html
Normal file
48
xuexiao/templates/attendance_select.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{% 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-clipboard-check"></i> 考勤管理</h4>
|
||||
</div>
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<h6 class="mb-3">请选择要录入考勤的班级</h6>
|
||||
{% if classes %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>班级名称</th>
|
||||
<th>课程</th>
|
||||
<th>授课老师</th>
|
||||
<th>学员人数</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for cls in classes %}
|
||||
<tr>
|
||||
<td>{{ cls.name }}</td>
|
||||
<td>{{ cls.course.name if cls.course else '-' }}</td>
|
||||
<td>{{ cls.teacher.name if cls.teacher else '-' }}</td>
|
||||
<td>{{ cls.class_students|selectattr('status', 'equalto', 1)|list|length }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('class_attendance', class_id=cls.id) }}" class="btn btn-sm btn-primary">
|
||||
<i class="bi bi-pencil"></i> 录入考勤
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="bi bi-inbox" style="font-size:3rem;"></i>
|
||||
<p class="mt-2">暂无班级,请先创建班级</p>
|
||||
<a href="{{ url_for('class_add') }}" class="btn btn-primary">创建班级</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user