enorme push

This commit is contained in:
2024-10-25 16:49:52 +02:00
parent 829d121268
commit 52faa489fa
23 changed files with 448 additions and 166 deletions

View File

@@ -0,0 +1,16 @@
{% extends "base.twig" %}
{% block title %}Ajouter rôle{% endblock %}
{% block content %}
<h1>Ajouter un rôle</h1>
<form class="form-group" role="search" method="post">
<label for="name">Nom du rôle</label>
<input type="text" class="form-control" name="name" id="name">
<input type="submit" class="btn btn-success" name="Ajouter" />
</form>
{% endblock %}

View File

@@ -0,0 +1,17 @@
{% extends "base.twig" %}
{% block title %}Modification du rôle{% endblock %}
{% block content %}
<h1>Modifier un rôle</h1>
<form method="post">
<label for="name">Nom</label>
<input type="text" class="form-control" name="name" id="name" value="{{ role.name }}">
<input type="submit" class="btn btn-success" name="Enregistrer" value="Enregistrer" />
<input type="hidden" name="id" value="{{ role.id }}">
</form>
{% endblock %}

View File

@@ -0,0 +1,36 @@
{% extends "base.twig" %}
{% block title %}Liste des rôles{% endblock %}
{% block content %}
<h1 class="">Liste des rôles</h1>
<table class="table table-striped table-bordered table-condensed">
<thead>
<th>ID</th>
<th>Nom</th>
</thead>
<tbody>
{# afficher les roles #}
{% for role in roles %}
<tr>
<td>{{ role.id }}</td>
<td>{{ role.name }}</td>
<td>
<button type="button" class="btn btn-info"
onclick="window.location.href='details.php?id={{ role.id }}'">Voir</button>
<button type="button" class="btn btn-warning"
onclick="window.location.href='edit.php?id={{ role.id }}'">Modifier</button>
<button type="button" class="btn btn-danger"
onclick="window.location.href='delete.php?id={{ role.id }}'">Supprimer</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<button type="button" class="btn btn-success mb-2" onclick="window.location.href='add.php'">Ajouter</button>
{% endblock %}