Embellissement de la page d'atelier, mes ateliers et des ateliers suivis. Ajout aussi d'une page d'accueil

This commit is contained in:
François 2023-02-10 20:06:41 +00:00
parent 15afb259fe
commit 467e7abf7a
5 changed files with 122 additions and 91 deletions

View File

@ -3,22 +3,24 @@
{% block title %}Atelier index{% endblock %}
{% block body %}
<h1>Liste des Ateliers</h1>
<div class="card mb-4">
<div class="card-header">
<h1 class="card-title">Liste des Ateliers</h1>
</div>
{% if (ateliers | length) > 0 %}
<table class="table">
<div class="card-body table-responsive">
<table class="table align-middle">
<thead>
<tr>
<th scope="row">Id</th>
<th scope="col">Nom</th>
<th class="" scope="col">Description</th>
<th scope="col">Actions</th>
<th scope="col">NOM</th>
<th 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>{{ atelier.description | raw }}</td>
<td>
@ -40,8 +42,8 @@
</tbody>
</table>
<div class="d-flex justify-content-center">
<a class="btn btn-primary mb-3" href="{{ path('app_atelier_new') }}">Créer atelier</a>
<div class="card-footer d-flex justify-content-center">
<a class="btn btn-primary" href="{{ path('app_atelier_new') }}">Créer atelier</a>
</div>
{% else %}
<div class="alert alert-info" role="alert">
@ -50,4 +52,6 @@
un !</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -3,22 +3,24 @@
{% block title %}Atelier suivis{% endblock %}
{% block body %}
<h1>Liste des Atelier suivis</h1>
<div class="card mb-4">
<div class="card-header">
<h1 class="card-title">Liste des Ateliers suivis</h1>
</div>
{% if (ateliers | length) > 0 %}
<div class="card-body table-responsive">
<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>
<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>{{ atelier.description | raw }}</td>
<td>
@ -38,4 +40,6 @@
href="{{ path('app_atelier_index') }}">en suivre un !</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -1,6 +1,6 @@
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">CC34</a>
<a class="navbar-brand" href="{{ path('app_index') }}">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>
@ -11,7 +11,7 @@
<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>
<a class="nav-link" href="{{ path('app_atelier_index') }}">Ateliers</a>
</li>
{% if app.user and is_granted('ROLE_INSTRUCTEUR') %}

View File

@ -4,17 +4,40 @@
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
.example-wrapper {
margin: 1em auto;
max-width: 800px;
width: 95%;
font: 18px/1.5 sans-serif;
}
.example-wrapper code {
background: #F5F5F5;
padding: 2px 6px;
}
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
<div class="d-flex justify-content-center">
<div class="row text-center mt-2">
This friendly message is coming from:
<ul>
<li>Your controller at <code><a href="{{ '/var/www/html/cc34/src/Controller/PagesController.php'|file_link(0) }}">src/Controller/PagesController.php</a></code></li>
<li>Your template at <code><a href="{{ '/var/www/html/cc34/templates/pages/index.html.twig'|file_link(0) }}">templates/pages/index.html.twig</a></code></li>
</ul>
{% if not app.user %}
<h1>
Bonjour utilisateur !
</h1>
{% elseif app.user %}
<h1>
Bonjour <strong>{{ app.user.nom }} {{ app.user.prenom }}</strong> !
</h1>
<div class="row mt-4 mx-auto w-50">
<a class="btn btn-primary btn-lg" href="{{ path('app_atelier_index') }} }">Afficher tous les
ateliers</a>
<a class="btn btn-primary btn-lg mt-2" href="{{ path('app_atelier_by_me') }}">Afficher mes
ateliers</a>
<a class="btn btn-primary btn-lg mt-2" href="{{ path('app_logout') }}">Déconnexion</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -37,7 +37,7 @@
</table>
</div>
<div class="card-footer">
<div class="card-footer d-flex justify-content-center">
<a class="btn btn-primary" href="{{ path('app_user_new') }}">Créer un Utilisateur</a>
</div>
</div>