bump project
This commit is contained in:
53
app/templates/people/index.html
Normal file
53
app/templates/people/index.html
Normal file
@@ -0,0 +1,53 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}People · Face Attendance{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<p class="eyebrow">Enrollment</p>
|
||||
<h1>People</h1>
|
||||
</div>
|
||||
{% if current_user.can_operate %}
|
||||
<a class="btn btn-primary" href="{{ url_for('people.new_person') }}">Enroll person</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<section class="content-section">
|
||||
{% if people %}
|
||||
<div class="table-responsive">
|
||||
<table class="table align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Employee ID</th>
|
||||
<th>Face samples</th>
|
||||
<th>Status</th>
|
||||
<th class="text-end">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in people %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('people.detail', person_id=person.id) }}">{{ person.full_name }}</a></td>
|
||||
<td>{{ person.employee_id }}</td>
|
||||
<td>{{ person.face_encodings|length }}</td>
|
||||
<td><span class="badge text-bg-{{ 'success' if person.active else 'secondary' }}">{{ "Active" if person.active else "Inactive" }}</span></td>
|
||||
<td class="text-end">
|
||||
{% if current_user.can_operate %}
|
||||
<form method="post" action="{{ url_for('people.toggle_person', person_id=person.id) }}" class="d-inline">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<button class="btn btn-outline-secondary btn-sm" type="submit">{{ "Deactivate" if person.active else "Activate" }}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state">No people have been enrolled yet.</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user