12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- {% extends 'bulma.html.twig' %}
- {% block title %}Administration > Games{% endblock %}
- {% block content %}
- <nav class="breadcrumb has-arrow-separator" aria-label="breadcrumbs">
- <ul>
- <li><a href="{{ path('app_main') }}">Accueil</a></li>
- <li><a href="{{ path('app_admin') }}">Administration</a></li>
- <li class="is-active"><a href="{{ path('app_admin_game') }}">Gestion des jeux</a></li>
- </ul>
- </nav>
- <div class="block">
- <h1 class="title">Gestion des jeux</h1>
- <p class="subtitle">Liste de jeux de rôle connus dans l'application.</p>
- </div>
- <div class="block">
- <div class="is-grouped">
- <a class="button is-primary" href="{{ path('app_admin_game_add') }}">Ajouter un jeu</a>
- </div>
- </div>
- <div class="block">
- <table id="datatable" {{ stimulus_controller('datatables') }} class="table is-striped is-hoverable is-fullwidth">
- <thead>
- <tr>
- <th>Nom du jeu</th>
- <th>Validé?</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- {% for game in games %}
- <tr>
- <td><a href="{{ path('app_admin_game_edit', {id: game.id}) }}">{{ game.name }}</a></td>
- <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>
- <td>
- <a class="button" href="{{ path('app_admin_game_edit', {id: game.id}) }}">Éditer</a>
- <a class="button is-danger" data-id="{{ path('app_admin_game_delete', {'id': game.id})}}" href="#" {{ stimulus_controller('admin_confirm') }}>Supprimer</a>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- {% endblock %}
|