Create gestion.html
Browse files- templates/gestion.html +53 -0
templates/gestion.html
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
|
| 3 |
+
{% block title %}Gestion des Podcasts{% endblock %}
|
| 4 |
+
|
| 5 |
+
{% block content %}
|
| 6 |
+
<h2>Ajouter un Nouveau Podcast</h2>
|
| 7 |
+
<form method="POST" action="{{ url_for('gestion') }}">
|
| 8 |
+
<div>
|
| 9 |
+
<label for="name">Nom du fichier audio :</label><br>
|
| 10 |
+
<input type="text" id="name" name="name" required>
|
| 11 |
+
</div>
|
| 12 |
+
<div>
|
| 13 |
+
<label for="url">Lien de t茅l茅chargement :</label><br>
|
| 14 |
+
<input type="url" id="url" name="url" required placeholder="https://example.com/audio.mp3">
|
| 15 |
+
</div>
|
| 16 |
+
<div>
|
| 17 |
+
<label for="subject">Mati猫re :</label><br>
|
| 18 |
+
<input type="text" id="subject" name="subject" required>
|
| 19 |
+
</div>
|
| 20 |
+
<br>
|
| 21 |
+
<button type="submit">Ajouter le Podcast</button>
|
| 22 |
+
</form>
|
| 23 |
+
|
| 24 |
+
<h2>Podcasts Actuels</h2>
|
| 25 |
+
{% if podcasts %}
|
| 26 |
+
<table>
|
| 27 |
+
<thead>
|
| 28 |
+
<tr>
|
| 29 |
+
<th>Nom</th>
|
| 30 |
+
<th>Mati猫re</th>
|
| 31 |
+
<th>URL</th>
|
| 32 |
+
<th>Action</th>
|
| 33 |
+
</tr>
|
| 34 |
+
</thead>
|
| 35 |
+
<tbody>
|
| 36 |
+
{% for podcast in podcasts %}
|
| 37 |
+
<tr>
|
| 38 |
+
<td>{{ podcast.name }}</td>
|
| 39 |
+
<td>{{ podcast.subject }}</td>
|
| 40 |
+
<td><a href="{{ podcast.url }}" target="_blank">Lien</a></td>
|
| 41 |
+
<td>
|
| 42 |
+
<form method="POST" action="{{ url_for('delete_podcast', podcast_id=podcast.id) }}" style="display:inline;">
|
| 43 |
+
<button type="submit" onclick="return confirm('脢tes-vous s没r de vouloir supprimer ce podcast ?');">Supprimer</button>
|
| 44 |
+
</form>
|
| 45 |
+
</td>
|
| 46 |
+
</tr>
|
| 47 |
+
{% endfor %}
|
| 48 |
+
</tbody>
|
| 49 |
+
</table>
|
| 50 |
+
{% else %}
|
| 51 |
+
<p>Aucun podcast ajout茅 pour le moment.</p>
|
| 52 |
+
{% endif %}
|
| 53 |
+
{% endblock %}
|