fix btn question 5

This commit is contained in:
Zakarya BENJABALLAH 2023-02-07 18:32:56 +01:00
parent e51bd37b8a
commit 68973c14fd
6 changed files with 44 additions and 44 deletions

View File

@ -1,4 +1,4 @@
<form method="post" action="{{ path('app_atelier_delete', {'id': atelier.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ atelier.id) }}">
<button class="btn btn-outline-danger" >Delete</button>
<button class="btn btn-outline-danger m-2" >Supprimer</button>
</form>

View File

@ -1,4 +1,8 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn btn-outline-primary" >{{ button_label|default('Save') }}</button>
<div class="d-flex flex-row">
<button class="btn btn-outline-primary m-2">{{ button_label|default('Save') }}</button>
<a class="btn btn-outline-primary m-2" href="{{ path('app_atelier_index') }}">Retour à la liste</a>
</div>
{{ form_end(form) }}

View File

@ -1,13 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Atelier{% endblock %}
{% block title %}Modifier l'atelier{% endblock %}
{% block body %}
<h1>Edit Atelier</h1>
<h1>Modifier l'atelier</h1>
{{ include('atelier/_form.html.twig', {'button_label': 'Update'}) }}
<a class="btn btn-outline-primary" href="{{ path('app_atelier_index') }}">back to list</a>
{{ include('atelier/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
{{ include('atelier/_delete_form.html.twig') }}
{% endblock %}

View File

@ -7,25 +7,26 @@
<table class="table">
<thead>
<tr>
<th scope="row">Id</th>
<th scope="col">Nom</th>
<th class="" scope="col">Description</th>
<th scope="col">Actions</th>
</tr>
<tr>
<th scope="row">Id</th>
<th scope="col">Nom</th>
<th class="" scope="col">Description</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
{% for atelier in ateliers %}
<tr>
<td>{{ atelier.id }}</td>
<td>{{ atelier.nom }}</td>
<td class="w-75">{{ atelier.description }}</td>
<td>{{ atelier.description }}</td>
<td>
<div>
<a class="btn btn-outline-primary" href="{{ path('app_atelier_show', {'id': atelier.id}) }}">show</a>
<a class="btn btn-outline-primary" href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">edit</a>
<div class="d-flex flex-row">
<a class="btn btn-outline-primary m-1"
href="{{ path('app_atelier_show', {'id': atelier.id}) }}">Afficher</a>
<a class="btn btn-outline-primary m-1"
href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">Modifier</a>
</div>
</td>
</tr>
{% else %}
@ -36,5 +37,7 @@
</tbody>
</table>
<a class="btn btn-outline-primary" href="{{ path('app_atelier_new') }}">Create new</a>
<div class="d-flex justify-content-center">
<a class="btn btn-primary mb-3" href="{{ path('app_atelier_new') }}">Créer atelier</a>
</div>
{% endblock %}

View File

@ -1,11 +1,9 @@
{% extends 'base.html.twig' %}
{% block title %}New Atelier{% endblock %}
{% block title %}Nouvel atelier{% endblock %}
{% block body %}
<h1>Create new Atelier</h1>
<h1>Créer un nouvel atelier</h1>
{{ include('atelier/_form.html.twig') }}
<a class="btn btn-outline-primary" href="{{ path('app_atelier_index') }}">back to list</a>
{{ include('atelier/_form.html.twig', {'button_label': 'Sauvegarder'}) }}
{% endblock %}

View File

@ -7,28 +7,25 @@
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ atelier.id }}</td>
</tr>
<tr>
<th>Nom</th>
<td>{{ atelier.nom }}</td>
</tr>
<tr>
<th>Description</th>
<td>{{ atelier.description }}</td>
</tr>
<tr>
<th>Id</th>
<td>{{ atelier.id }}</td>
</tr>
<tr>
<th>Nom</th>
<td>{{ atelier.nom }}</td>
</tr>
<tr>
<th>Description</th>
<td>{{ atelier.description }}</td>
</tr>
</tbody>
</table>
<div class="btn-group " role="group">
<a class="btn btn-outline-primary" href="{{ path('app_atelier_index') }}">back to list</a>
<a class="btn btn-outline-primary" href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">edit</a>
{{ include('atelier/_delete_form.html.twig') }}
<div class="d-flex flex-row">
<a class="btn btn-outline-primary m-2" href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">Modifier</a>
<a class="btn btn-outline-primary m-2" href="{{ path('app_atelier_index') }}">Retour à la liste</a>
{{ include('atelier/_delete_form.html.twig') }}
</div>
{% endblock %}