|
1 | 1 |
|
2 | | -{% block title %}Administration générale{% endblock %} |
| 2 | +{% block title %}HelloAsso Widgets - Administration{% endblock %} |
3 | 3 |
|
4 | 4 | {% extends "layout.html.twig" %} |
5 | 5 | {% block content %} |
|
241 | 241 | </div> |
242 | 242 | </div> |
243 | 243 | <div class="container"> |
244 | | - <h1 class="my-4 text-center">Administration générale</h1> |
| 244 | + <h1 class="my-4 text-center">HelloAsso Widgets</h1> |
245 | 245 |
|
246 | 246 | <div class="row my-4"> |
247 | 247 | <div class="col-10"> |
|
261 | 261 | </div> |
262 | 262 |
|
263 | 263 | <h3>Liste des Charity Events</h3> |
264 | | - <table class="table table-bordered table-striped"> |
265 | | - <thead class="thead-dark"> |
| 264 | + <table class="table table-hover align-middle"> |
| 265 | + <thead> |
266 | 266 | <tr> |
267 | 267 | <th>Id</th> |
268 | | - <th>Guid</th> |
269 | 268 | <th>Titre</th> |
270 | 269 | <th>Admin</th> |
| 270 | + <th>Date de création</th> |
271 | 271 | <th>Actions</th> |
272 | 272 | </tr> |
273 | 273 | </thead> |
274 | 274 | <tbody> |
275 | 275 | {% for event in events %} |
276 | | - <tr> |
| 276 | + <tr class="cursor-pointer" onclick="window.location='/admin/event/{{ event.guid }}/edit'" title="GUID : {{ event.guid }}"> |
277 | 277 | <td>{{ event.id | e }}</td> |
278 | | - <td>{{ event.guid | e }}</td> |
279 | 278 | <td>{{ event.title | e }}</td> |
280 | 279 | <td>{{ event.admin | e }}</td> |
281 | | - <td class="d-flex justify-content-evenly"> |
282 | | - <a href="/admin/event/{{ event.guid }}/edit" class="btn btn-primary mb-3" data-bs-toggle="tooltip" data-bs-title="Édition">📝</a> |
| 280 | + <td>{{ event.creation_date ? event.creation_date|date('d/m/Y H:i') : '—' }}</td> |
| 281 | + <td class="d-flex gap-2" onclick="event.stopPropagation()"> |
| 282 | + <a href="/admin/event/{{ event.guid }}/edit" class="btn btn-sm btn-outline-primary" data-bs-toggle="tooltip" data-bs-title="Édition">📝</a> |
283 | 283 | <form action="/admin/event/{{ event.guid }}/delete" method="POST"> |
284 | | - <button type="submit" class="btn btn-danger" name="delete" data-bs-toggle="tooltip" data-bs-title="Suppression" onclick="confirmDelete(event)">🗑️</button> |
| 284 | + <button type="submit" class="btn btn-sm btn-outline-danger" name="delete" data-bs-toggle="tooltip" data-bs-title="Suppression" onclick="confirmDelete(event)">🗑️</button> |
285 | 285 | </form> |
286 | 286 | </td> |
287 | 287 | </tr> |
|
290 | 290 | </table> |
291 | 291 |
|
292 | 292 | <h3>Liste des Charity Streams</h3> |
293 | | - <table class="table table-bordered table-striped"> |
294 | | - <thead class="thead-dark"> |
| 293 | + <table class="table table-hover align-middle"> |
| 294 | + <thead> |
295 | 295 | <tr> |
296 | 296 | <th>ID</th> |
297 | | - <th>GUID</th> |
298 | 297 | <th>Titre</th> |
299 | 298 | <th>Admin</th> |
300 | 299 | <th>Slug formulaire</th> |
|
304 | 303 | </thead> |
305 | 304 | <tbody> |
306 | 305 | {% for stream in streams %} |
307 | | - <tr> |
| 306 | + <tr class="cursor-pointer" onclick="window.location='/admin/stream/{{ stream.guid }}/edit'" title="GUID : {{ stream.guid }}"> |
308 | 307 | <td>{{ stream.id | e }}</td> |
309 | | - <td>{{ stream.guid | e }}</td> |
310 | 308 | <td>{{ stream.title | e }}</td> |
311 | 309 | <td>{{ stream.admin | e }}</td> |
312 | 310 | <td>{{ stream.form_slug | e }}</td> |
313 | 311 | <td>{{ stream.organization_slug | e }}</td> |
314 | | - <td class="d-flex justify-content-evenly"> |
315 | | - <a href="/admin/stream/{{ stream.guid }}/edit" class="btn btn-primary mb-3" data-bs-toggle="tooltip" data-bs-title="Édition">📝</a> |
316 | | - <a href="/redirect_auth_page?organizationSlug={{ stream.organization_slug }}" class="btn btn-success mb-3" data-bs-toggle="tooltip" data-bs-title="Mire d'authorisation" target="_blank">🔑</a> |
| 312 | + <td class="d-flex gap-2" onclick="event.stopPropagation()"> |
| 313 | + <a href="/admin/stream/{{ stream.guid }}/edit" class="btn btn-sm btn-outline-primary" data-bs-toggle="tooltip" data-bs-title="Édition">📝</a> |
| 314 | + <a href="/redirect_auth_page?organizationSlug={{ stream.organization_slug }}" class="btn btn-sm btn-outline-success" data-bs-toggle="tooltip" data-bs-title="Mire d'authorisation" target="_blank">🔑</a> |
317 | 315 | <form action="/admin/stream/{{ stream.guid }}/delete" method="POST"> |
318 | | - <button type="submit" class="btn btn-danger" name="delete" data-bs-toggle="tooltip" data-bs-title="Suppression" onclick="confirmDelete(event)">🗑️</button> |
| 316 | + <button type="submit" class="btn btn-sm btn-outline-danger" name="delete" data-bs-toggle="tooltip" data-bs-title="Suppression" onclick="confirmDelete(event)">🗑️</button> |
319 | 317 | </form> |
320 | 318 | </td> |
321 | 319 | </tr> |
|
354 | 352 | {% endblock %} |
355 | 353 | {% block styles %} |
356 | 354 | <style> |
| 355 | + /* ── Lignes de tableau cliquables ── */ |
| 356 | + .cursor-pointer { cursor: pointer; } |
| 357 | + .table-hover tbody tr.cursor-pointer:hover { |
| 358 | + background-color: rgba(var(--bs-primary-rgb), .08) !important; |
| 359 | + } |
| 360 | +
|
357 | 361 | /* ── Cartes de sélection de mode ── */ |
358 | 362 | .stream-mode-card { |
359 | 363 | cursor: pointer; |
|
407 | 411 | {% block scripts %} |
408 | 412 | <script> |
409 | 413 | document.addEventListener('DOMContentLoaded', function() { |
| 414 | + /* ── Auto-ouverture de la modal de création de stream ── */ |
| 415 | + {% if openCreateStream %} |
| 416 | + var createStreamModal = document.getElementById('createStreamModal'); |
| 417 | + if (createStreamModal) { |
| 418 | + var modal = new bootstrap.Modal(createStreamModal); |
| 419 | + modal.show(); |
| 420 | + {% if selectedEventId %} |
| 421 | + var parentEventSelect = document.getElementById('parent_event'); |
| 422 | + if (parentEventSelect) parentEventSelect.value = '{{ selectedEventId }}'; |
| 423 | + {% endif %} |
| 424 | + } |
| 425 | + {% endif %} |
| 426 | +
|
410 | 427 | /* ── Validation Bootstrap ── */ |
411 | 428 | document.querySelectorAll('.needs-validation').forEach(function(form) { |
412 | 429 | form.addEventListener('submit', function(e) { |
|
0 commit comments