Files
AdventCalendar/templates/projects.html
2025-12-02 14:07:54 +01:00

64 lines
2.0 KiB
HTML

<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<title>Tableau de bord</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet" />
</head>
<body class="bg-light">
<div class="container py-5">
<h1>Tableau de bord</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="alert alert-info alert-dismissible fade show mt-4">
{% for m in messages %}
<div><i class="fas fa-info-circle me-2"></i>{{ m }}</div>
{% endfor %}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endif %}
{% endwith %}
<table class="table table-hover mt-3">
<thead>
<tr>
<th>ID</th>
<th>Illustration</th>
<th>Nom du projet</th>
<th>Description</th>
<th>Nombre de jours</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for p in projects %}
<tr>
<td>{{ p.id }}</td>
<td>
{% if p.image_url %}
<img src="{{ p.image_url }}" alt="Illustration" style="width:50px; height:50px; object-fit:cover; border-radius:5px;">
{% else %}
<span class="text-muted">Aucune</span>
{% endif %}
</td>
<td>{{ p.name }}</td>
<td>{{ p.description or '—' }}</td>
<td>{{ p.total_days }}</td>
<td>
<a href="{{ url_for('project_view', project_id=p.id) }}" class="btn btn-primary btn-sm">Voir calendrier</a>
<a href="{{ url_for('admin_project_people', project_id=p.id) }}" class="btn btn-secondary btn-sm">Gérer utilisateurs</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ url_for('logout') }}" class="btn btn-link mt-3">Déconnexion</a>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>