Spaces:
Sleeping
Sleeping
| {% extends "base.html" %} | |
| {% block title %}G茅rer les Sujets - {{ super() }}{% endblock %} | |
| {% block content %} | |
| <h2 class="mb-4">G茅rer les Sujets</h2> | |
| <div class="d-flex gap-2 mb-4"> | |
| <a href="{{ url_for('admin_home') }}" class="btn btn-secondary">Retour 脿 l'admin</a> | |
| <a href="{{ url_for('admin_new_subject') }}" class="btn btn-primary">Nouveau Sujet</a> | |
| </div> | |
| <div class="table-responsive"> | |
| <table class="table table-striped table-hover"> | |
| <thead class="table-dark"> | |
| <tr> | |
| <th>ID</th> | |
| <th>Nom</th> | |
| <th>Ic么ne</th> | |
| <th>Actions</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| {% for subject in subjects %} | |
| <tr> | |
| <td>{{ subject.id }}</td> | |
| <td>{{ subject.name }}</td> | |
| <td> | |
| {% if subject.icon_data %} | |
| <img src="{{ url_for('get_subject_icon', subject_id=subject.id) }}" alt="Ic么ne" class="img-thumbnail" style="max-width: 50px; max-height: 50px;"> | |
| {% else %} | |
| <span class="text-muted">Aucune ic么ne</span> | |
| {% endif %} | |
| </td> | |
| <td> | |
| <div class="btn-group" role="group"> | |
| <a href="{{ url_for('admin_edit_subject', subject_id=subject.id) }}" class="btn btn-sm btn-outline-primary">脡diter</a> | |
| <form method="post" action="{{ url_for('admin_delete_subject', subject_id=subject.id) }}" style="display:inline;" onsubmit="return confirm('脢tes-vous s没r de vouloir supprimer ce sujet ?')"> | |
| <button type="submit" class="btn btn-sm btn-outline-danger">Supprimer</button> | |
| </form> | |
| </div> | |
| </td> | |
| </tr> | |
| {% endfor %} | |
| </tbody> | |
| </table> | |
| </div> | |
| {% endblock %} |