enorme push
This commit is contained in:
16
tpCrudTwig/templates/roles/add.twig
Normal file
16
tpCrudTwig/templates/roles/add.twig
Normal 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 %}
|
||||
17
tpCrudTwig/templates/roles/edit.twig
Normal file
17
tpCrudTwig/templates/roles/edit.twig
Normal 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 %}
|
||||
36
tpCrudTwig/templates/roles/index.twig
Normal file
36
tpCrudTwig/templates/roles/index.twig
Normal 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 %}
|
||||
Reference in New Issue
Block a user