|
7 | 7 | <h1 class="d-flex align-items-center gap-2"> |
8 | 8 | Modération |
9 | 9 | </h1> |
10 | | - <a class="btn btn-outline-primary btn-sm d-inline-flex align-items-center gap-1" |
11 | | - href="{% url 'moderators_list' %}"> |
12 | | - <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-people-fill" viewBox="0 0 16 16"> |
13 | | - <path d="M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1H7Zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm-5.784 6A2.238 2.238 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.325 6.325 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1h4.216ZM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/> |
14 | | - </svg> |
15 | | - <span>Gérer les modérateurs</span> |
16 | | - </a> |
| 10 | + <div class="d-flex gap-2 flex-wrap"> |
| 11 | + <a class="btn btn-outline-primary btn-sm d-inline-flex align-items-center gap-1" |
| 12 | + href="{% url 'manage_moderators' %}"> |
| 13 | + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-people-fill" viewBox="0 0 16 16"> |
| 14 | + <path d="M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1H7Zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm-5.784 6A2.238 2.238 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.325 6.325 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1h4.216ZM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/> |
| 15 | + </svg> |
| 16 | + <span>Gérer les modérateurs</span> |
| 17 | + </a> |
| 18 | + <a class="btn btn-outline-secondary btn-sm" href="{% url 'moderation_tree' %}">Arbre</a> |
| 19 | + <a class="btn btn-outline-secondary btn-sm" href="{% url 'public_logs' %}">Journal</a> |
| 20 | + <a class="btn btn-outline-secondary btn-sm" href="{% url 'moderation_about' %}">À propos</a> |
| 21 | + </div> |
17 | 22 | </header> |
18 | 23 | {% endblock header %} |
19 | 24 |
|
20 | 25 | {% block content %} |
21 | | - <div class="container-xl mt-4"> |
22 | | - |
23 | | - {% if request.GET.error == 'reason' %} |
24 | | - <div class="alert alert-danger alert-dismissible fade show shadow-sm" role="alert"> |
25 | | - <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2" viewBox="0 0 16 16"> |
26 | | - <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/> |
27 | | - </svg> |
28 | | - Veuillez fournir une raison d'au moins 10 caractères pour justifier le refus. |
29 | | - <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> |
30 | | - </div> |
31 | | - {% endif %} |
32 | | - <div class="d-flex align-items-center justify-content-between mb-4"> |
33 | | - <h2 class="h4 mb-0">Demandes en attente ({{ pending_requests.count }})</h2> |
34 | | - </div> |
35 | | - |
36 | | - <div class="row"> |
37 | | - {% for req in pending_requests %} |
38 | | - <div class="col-md-6 col-lg-4 mb-4"> |
39 | | - <div class="card shadow-sm border-0 h-100"> |
40 | | - <div class="card-body d-flex flex-column"> |
41 | | - |
42 | | - <div class="d-flex align-items-center gap-3 mb-3"> |
43 | | - <div class="bg-primary text-white rounded-circle d-flex align-items-center justify-content-center shadow-sm" style="width: 45px; height: 45px; font-size: 1.1rem; font-weight: bold;"> |
44 | | - {{ req.user.initials|upper }} |
45 | | - </div> |
46 | | - <div> |
47 | | - <h5 class="card-title h6 mb-0">{{ req.user.fullname }}</h5> |
48 | | - <small class="text-muted">{{ req.user.netid }}</small> |
49 | | - </div> |
50 | | - </div> |
51 | | - |
52 | | - <div class="mb-3"> |
53 | | - <span class="badge bg-light text-dark border border-secondary">{{ req.get_faculty_display }}</span> |
54 | | - <span class="badge bg-light text-dark border border-secondary">{{ req.get_role_display }}</span> |
55 | | - </div> |
56 | | - |
57 | | - {% if req.comment %} |
58 | | - <div class="bg-light p-3 rounded mb-3 flex-grow-1"> |
59 | | - <p class="card-text small fst-italic mb-0 text-muted"> |
60 | | - "{{ req.comment }}" |
61 | | - </p> |
62 | | - </div> |
63 | | - {% else %} |
64 | | - <div class="flex-grow-1"></div> |
65 | | - {% endif %} |
66 | | - |
67 | | - <p class="text-muted small mb-3"> |
68 | | - 📅 Reçue le {{ req.created|date:"d/m/Y à H:i" }} |
69 | | - </p> |
70 | | - |
71 | | - <div class="pt-3 border-top mt-auto"> |
72 | | - <form method="post" action="{% url 'process_representative_request' req.id %}" class="w-100"> |
73 | | - {% csrf_token %} |
74 | | - <input type="text" name="rejection_reason" class="form-control form-control-sm mb-2" placeholder="Message de refus (10 caractères min.)" minlength="10"> |
75 | | - |
76 | | - <div class="d-flex gap-2"> |
77 | | - <button type="submit" name="action" value="accept" class="btn btn-success btn-sm flex-grow-1 fw-bold">Accepter</button> |
78 | | - <button type="submit" name="action" value="reject" class="btn btn-outline-danger btn-sm flex-grow-1" data-turbo-confirm="Es-tu sûr de vouloir refuser cette demande ?">Refuser</button> |
79 | | - </div> |
80 | | - </form> |
81 | | - </div> |
82 | | - |
83 | | - </div> |
84 | | - </div> |
85 | | - </div> |
86 | | - {% empty %} |
87 | | - <div class="col-12"> |
88 | | - <div class="alert alert-light border border-secondary text-center py-5 text-muted shadow-sm"> |
89 | | - <h5 class="mb-2">Tout est calme ! ☕</h5> |
90 | | - <p class="mb-0">Il n'y a aucune demande d'accès modérateur en attente pour le moment.</p> |
91 | | - </div> |
92 | | - </div> |
93 | | - {% endfor %} |
94 | | - </div> |
95 | | - </div> |
96 | 26 | {% endblock content %} |
0 commit comments