Files
menu-miam/templates/accompagnements.html
2026-03-23 20:21:04 +01:00

58 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mes accompagnements</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<div class="container">
<div class="top-nav">
<a href="{{ url_for('menu') }}" class="btn btn-secondary">← Retour au menu</a>
<a href="{{ url_for('add_accompagnement') }}" class="btn"> Ajouter un accompagnement</a>
</div>
<h1>🥗 Mes accompagnements</h1>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }}">
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
{% if accompagnements %}
<div class="recettes-list">
{% for acc in accompagnements %}
<div class="recette-card">
<h3>{{ acc['nom'] }}</h3>
{% if acc['descriptif'] %}
<div class="ingredients">
<strong>Descriptif :</strong>
<pre>{{ acc['descriptif'] }}</pre>
</div>
{% endif %}
<div class="actions">
<a href="{{ url_for('edit_accompagnement', id=acc['id']) }}" class="btn-edit">✏️ Modifier</a>
<form method="POST" action="{{ url_for('delete_accompagnement', id=acc['id']) }}" style="display: inline;">
<button type="submit" class="btn-delete" onclick="return confirm('Supprimer cet accompagnement ?')">🗑️ Supprimer</button>
</form>
</div>
</div>
{% endfor %}
</div>
{% else %}
<p style="text-align: center; color: #666; margin: 40px 0;">
Aucun accompagnement pour le moment. Commencez par en ajouter un !
</p>
{% endif %}
</div>
</body>
</html>