Merge branch '18-EmbellissementAtelier' into 'master'

Embellissement de la page d'atelier, mes ateliers et des ateliers suivis....

See merge request projet-sondage-l3-miage/cc34!2
This commit is contained in:
Aymeric SERRA 2023-02-10 20:10:13 +00:00
commit abfff02b6f
5 changed files with 122 additions and 91 deletions

View File

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

View File

@ -3,22 +3,24 @@
{% block title %}Atelier suivis{% endblock %} {% block title %}Atelier suivis{% endblock %}
{% block body %} {% 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 %} {% if (ateliers | length) > 0 %}
<div class="card-body table-responsive">
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th scope="row">Id</th> <th scope="col">NOM</th>
<th scope="col">Nom</th> <th class="" scope="col">DESCRIPTION</th>
<th class="" scope="col">Description</th> <th scope="col">ACTIONS</th>
<th scope="col">Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for atelier in ateliers %} {% for atelier in ateliers %}
<tr> <tr>
<td>{{ atelier.id }}</td>
<td>{{ atelier.nom }}</td> <td>{{ atelier.nom }}</td>
<td>{{ atelier.description | raw }}</td> <td>{{ atelier.description | raw }}</td>
<td> <td>
@ -38,4 +40,6 @@
href="{{ path('app_atelier_index') }}">en suivre un !</a> href="{{ path('app_atelier_index') }}">en suivre un !</a>
</div> </div>
{% endif %} {% endif %}
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,6 +1,6 @@
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid"> <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" <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
@ -11,7 +11,7 @@
<a class="nav-link active" aria-current="page" href="{{ path('app_index') }}">Home</a> <a class="nav-link active" aria-current="page" href="{{ path('app_index') }}">Home</a>
</li> </li>
<li class="nav-item"> <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> </li>
{% if app.user and is_granted('ROLE_INSTRUCTEUR') %} {% if app.user and is_granted('ROLE_INSTRUCTEUR') %}

View File

@ -4,17 +4,40 @@
{% block body %} {% block body %}
<style> <style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; } .example-wrapper {
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; } margin: 1em auto;
max-width: 800px;
width: 95%;
font: 18px/1.5 sans-serif;
}
.example-wrapper code {
background: #F5F5F5;
padding: 2px 6px;
}
</style> </style>
<div class="example-wrapper"> <div class="d-flex justify-content-center">
<h1>Hello {{ controller_name }}! ✅</h1> <div class="row text-center mt-2">
This friendly message is coming from: {% if not app.user %}
<ul> <h1>
<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> Bonjour utilisateur !
<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> </h1>
</ul> {% 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> </div>
{% endif %}
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -37,7 +37,7 @@
</table> </table>
</div> </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> <a class="btn btn-primary" href="{{ path('app_user_new') }}">Créer un Utilisateur</a>
</div> </div>
</div> </div>