From 6c3543b72f456aba90d1453f23f4fb54e36d9b60 Mon Sep 17 00:00:00 2001 From: Aymeric SERRA Date: Wed, 8 Feb 2023 19:09:30 +0100 Subject: [PATCH 1/2] Theme connexion et inscription et padding content pour question 11 --- templates/base.html.twig | 25 +++++++----- templates/registration/register.html.twig | 18 ++++++--- templates/security/login.html.twig | 49 ++++++++++++----------- 3 files changed, 53 insertions(+), 39 deletions(-) diff --git a/templates/base.html.twig b/templates/base.html.twig index d1a3044..68885be 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -19,7 +19,8 @@ -
{% block body %}{% endblock %}
+
+
+ {% block body %}{% endblock %} +
+
diff --git a/templates/registration/register.html.twig b/templates/registration/register.html.twig index 3f3581f..9bcd612 100644 --- a/templates/registration/register.html.twig +++ b/templates/registration/register.html.twig @@ -1,19 +1,25 @@ {% extends 'base.html.twig' %} -{% block title %}Register{% endblock %} +{% block title %}Inscription{% endblock %} {% block body %} -

Register

+

Inscription

{{ form_start(registrationForm) }} {{ form_row(registrationForm.email) }} - {{ form_row(registrationForm.nom) }} - {{ form_row(registrationForm.prenom) }} +
+
+ {{ form_row(registrationForm.nom) }} +
+
+ {{ form_row(registrationForm.prenom) }} +
+
{{ form_row(registrationForm.plainPassword, { - label: 'Password' + label: 'Mot de passe' }) }} - + {{ form_end(registrationForm) }} {% endblock %} diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig index 20f82a2..5ac306d 100644 --- a/templates/security/login.html.twig +++ b/templates/security/login.html.twig @@ -3,28 +3,30 @@ {% block title %}Log in!{% endblock %} {% block body %} -
- {% if error %} -
{{ error.messageKey|trans(error.messageData, 'security') }}
- {% endif %} + +

Veuillez-vous connecter

+ {% if error %} +
{{ error.messageKey|trans(error.messageData, 'security') }}
+ {% endif %} - {% if app.user %} -
- You are logged in as {{ app.user.userIdentifier }}, Logout -
- {% endif %} + {% if app.user %} +
+ You are logged in as {{ app.user.userIdentifier }}, Logout +
+ {% endif %} -

Veuillez-vous connecter

- - - - + + + + - + - {# + {# Uncomment this section and add a remember_me option below your firewall to activate remember me functionality. See https://symfony.com/doc/current/security/remember_me.html @@ -33,10 +35,11 @@ Remember me - #} + #} - -
+ S'incrire + + {% endblock %} From 24382df1d9db47fe879e92dfc492e814662d1586 Mon Sep 17 00:00:00 2001 From: Aymeric SERRA Date: Wed, 8 Feb 2023 19:21:56 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Boutons=20modifier=20et=20supprimer=20dispa?= =?UTF-8?q?raissent=20si=20pas=20connect=C3=A9=20pour=20question=2011?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/atelier/index.html.twig | 11 ++++++++--- templates/atelier/show.html.twig | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/templates/atelier/index.html.twig b/templates/atelier/index.html.twig index 9a4449b..6915971 100644 --- a/templates/atelier/index.html.twig +++ b/templates/atelier/index.html.twig @@ -21,11 +21,16 @@ {{ atelier.nom }} {{ atelier.description | raw }} -
+
Afficher - Modifier + {% if app.user and app.user == atelier.instructeur %} + Modifier + {% else %} + + {% endif %}
diff --git a/templates/atelier/show.html.twig b/templates/atelier/show.html.twig index 0d00f2c..70fdad9 100644 --- a/templates/atelier/show.html.twig +++ b/templates/atelier/show.html.twig @@ -27,9 +27,13 @@
+ {% if app.user and app.user == atelier.instructeur %} Modifier + {% endif %} Retour à la liste + {% if app.user and app.user == atelier.instructeur %} {{ include('atelier/_delete_form.html.twig') }} + {% endif %}
{% endblock %}