index.html.twig 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {% extends 'bulma.html.twig' %}
  2. {% block title %}Administration > Games{% endblock %}
  3. {% block content %}
  4. <nav class="breadcrumb has-arrow-separator" aria-label="breadcrumbs">
  5. <ul>
  6. <li><a href="{{ path('app_main') }}">Accueil</a></li>
  7. <li><a href="{{ path('app_admin') }}">Administration</a></li>
  8. <li class="is-active"><a href="{{ path('app_admin_game') }}">Gestion des jeux</a></li>
  9. </ul>
  10. </nav>
  11. <div class="block">
  12. <h1 class="title">Gestion des jeux</h1>
  13. <p class="subtitle">Liste de jeux de rôle connus dans l'application.</p>
  14. </div>
  15. <div class="block">
  16. <div class="is-grouped">
  17. <a class="button is-primary" href="{{ path('app_admin_game_add') }}">Ajouter un jeu</a>
  18. </div>
  19. </div>
  20. <div class="block">
  21. <table id="datatable" {{ stimulus_controller('datatables') }} class="table is-striped is-hoverable is-fullwidth">
  22. <thead>
  23. <tr>
  24. <th>Nom du jeu</th>
  25. <th>Validé?</th>
  26. <th>Actions</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. {% for game in games %}
  31. <tr>
  32. <td><a href="{{ path('app_admin_game_edit', {id: game.id}) }}">{{ game.name }}</a></td>
  33. <td>{% if game.isValidByAdmin %}<span class="icon"><twig:ux:icon name="bi:check"/></span>{% else %}<a href="{{ path('app_admin_game_valid', {id: game.id}) }}" class="button">Valider</a>{%endif%}</td>
  34. <td>
  35. <a class="button" href="{{ path('app_admin_game_edit', {id: game.id}) }}">Éditer</a>
  36. <a class="button is-danger" data-id="{{ path('app_admin_game_delete', {'id': game.id})}}" href="#" {{ stimulus_controller('admin_confirm') }}>Supprimer</a>
  37. </td>
  38. </tr>
  39. {% endfor %}
  40. </tbody>
  41. </table>
  42. </div>
  43. {% endblock %}