navBar debut bootstrap CRUD
This commit is contained in:
parent
752d0fbdc2
commit
e51bd37b8a
|
@ -1,3 +0,0 @@
|
||||||
body {
|
|
||||||
background-color: lightgray;
|
|
||||||
}
|
|
|
@ -8,7 +8,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
class PagesController extends AbstractController
|
class PagesController extends AbstractController
|
||||||
{
|
{
|
||||||
#[Route('/pages', name: 'app_pages')]
|
#[Route('/', name: 'app_index')]
|
||||||
public function index(): Response
|
public function index(): Response
|
||||||
{
|
{
|
||||||
return $this->render('pages/index.html.twig', [
|
return $this->render('pages/index.html.twig', [
|
||||||
|
|
|
@ -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?');">
|
<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) }}">
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ atelier.id) }}">
|
||||||
<button class="btn">Delete</button>
|
<button class="btn btn-outline-danger" >Delete</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
{{ form_widget(form) }}
|
{{ form_widget(form) }}
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
<button class="btn btn-outline-primary" >{{ button_label|default('Save') }}</button>
|
||||||
{{ form_end(form) }}
|
{{ form_end(form) }}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{{ include('atelier/_form.html.twig', {'button_label': 'Update'}) }}
|
{{ include('atelier/_form.html.twig', {'button_label': 'Update'}) }}
|
||||||
|
|
||||||
<a href="{{ path('app_atelier_index') }}">back to list</a>
|
<a class="btn btn-outline-primary" href="{{ path('app_atelier_index') }}">back to list</a>
|
||||||
|
|
||||||
{{ include('atelier/_delete_form.html.twig') }}
|
{{ include('atelier/_delete_form.html.twig') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Id</th>
|
<th scope="row">Id</th>
|
||||||
<th>Nom</th>
|
<th scope="col">Nom</th>
|
||||||
<th>Description</th>
|
<th class="" scope="col">Description</th>
|
||||||
<th>actions</th>
|
<th scope="col">Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -19,10 +19,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ atelier.id }}</td>
|
<td>{{ atelier.id }}</td>
|
||||||
<td>{{ atelier.nom }}</td>
|
<td>{{ atelier.nom }}</td>
|
||||||
<td>{{ atelier.description }}</td>
|
<td class="w-75">{{ atelier.description }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ path('app_atelier_show', {'id': atelier.id}) }}">show</a>
|
<div>
|
||||||
<a href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">edit</a>
|
<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>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -33,5 +36,5 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<a href="{{ path('app_atelier_new') }}">Create new</a>
|
<a class="btn btn-outline-primary" href="{{ path('app_atelier_new') }}">Create new</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -7,5 +7,5 @@
|
||||||
|
|
||||||
{{ include('atelier/_form.html.twig') }}
|
{{ include('atelier/_form.html.twig') }}
|
||||||
|
|
||||||
<a href="{{ path('app_atelier_index') }}">back to list</a>
|
<a class="btn btn-outline-primary" href="{{ path('app_atelier_index') }}">back to list</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -22,9 +22,13 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<a href="{{ path('app_atelier_index') }}">back to list</a>
|
<div class="btn-group " role="group">
|
||||||
|
|
||||||
<a href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">edit</a>
|
|
||||||
|
|
||||||
|
<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') }}
|
{{ include('atelier/_delete_form.html.twig') }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
|
<link rel="icon"
|
||||||
|
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
|
||||||
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
|
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
{{ encore_entry_link_tags('app') }}
|
{{ encore_entry_link_tags('app') }}
|
||||||
|
@ -15,6 +16,28 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% block body %}{% endblock %}
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<a class="navbar-brand" href="#">CC34</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" aria-current="page" href="{{ path('app_index') }}">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{{ path('app_atelier_index') }}">Atelier</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<div class="container">{% block body %}{% endblock %}</div>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue