remodulation du projet et des classes

This commit is contained in:
cedrick2711
2026-07-28 23:33:31 -04:00
parent 90ac3eb804
commit 3feae80767
94 changed files with 2644 additions and 4366 deletions
+68
View File
@@ -0,0 +1,68 @@
{% extends "layouts/base.html" %}
{% block title %}Manage Users - TryoutPro{% endblock %}
{% block page_title %}Manage Users{% endblock %}
{% block breadcrumb %}<span class="breadcrumb">Home / Users</span>{% endblock %}
{% block header_actions %}
<a href="{{ url_for('users.create_user') }}" class="btn btn-primary">
<i class="fas fa-user-plus"></i> Add User
</a>
{% endblock %}
{% block content %}
<div class="card">
<div class="card-body">
<div class="table-container">
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Username</th>
<th>Email</th>
<th>Role</th>
<th>Status</th>
<th>Joined</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for u in users %}
<tr>
<td>
<div class="user-mini">
<div class="avatar-sm">{{ u.username[:2] | upper }}</div>
<span>{{ u.username }}</span>
</div>
</td>
<td>{{ u.username }}</td>
<td>{{ u.email }}</td>
<td><span class="badge badge-{{ u.role }}">{{ u.role | capitalize }}</span></td>
<td>
{% if u.is_active_account %}
<span class="badge badge-success">Active</span>
{% else %}
<span class="badge badge-danger">Inactive</span>
{% endif %}
</td>
<td>{{ u.created_at.strftime('%m/%d/%Y') }}</td>
<td>
<a href="{{ url_for('users.edit_user', user_id=u.id) }}" class="btn btn-sm btn-outline">
<i class="fas fa-edit"></i> Edit
</a>
{% if u.id != current_user.id %}
<form method="POST" action="{{ url_for('users.delete_user', user_id=u.id) }}" class="inline-form" onsubmit="return confirm('Delete {{ u.username }}? This cannot be undone.');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button type="submit" class="btn btn-sm btn-danger">
<i class="fas fa-trash"></i>
</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}