Initial commit
This commit is contained in:
47
xuexiao/templates/attendance_form.html
Normal file
47
xuexiao/templates/attendance_form.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{% 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> 录入考勤 - {{ class_.name }}</h4>
|
||||
<a href="{{ url_for('class_detail', id=class_.id) }}" class="btn btn-outline-secondary"><i class="bi bi-arrow-left"></i> 返回班级</a>
|
||||
</div>
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="POST">
|
||||
<div class="row g-3 mb-3">
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">考勤日期</label>
|
||||
<input type="date" class="form-control" name="att_date" value="{{ today }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead class="table-light">
|
||||
<tr><th>学员</th><th>出勤状态</th><th>备注</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for cs in class_students %}
|
||||
{% if cs.status == 1 %}
|
||||
<tr>
|
||||
<td>{{ cs.student.name }}</td>
|
||||
<td>
|
||||
<select class="form-select" name="status_{{ cs.student_id }}">
|
||||
<option value="present" selected>出勤</option>
|
||||
<option value="absent">缺勤</option>
|
||||
<option value="leave">请假</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" name="remark_{{ cs.student_id }}" placeholder="可选">
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> 保存考勤</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user