From be021308399028fd49e843fadcb2ca9525c0d45d Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Wed, 30 Aug 2023 17:46:57 +0200 Subject: [PATCH] =?UTF-8?q?Membre=20(cot=C3=A9=20admin)=20:=20nouvelle=20s?= =?UTF-8?q?ection=20"informations=20diverses"=20(#971)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/member/_partial/info_misc.html.twig | 3 +++ .../views/member/_partial/shifts.html.twig | 4 ---- app/Resources/views/member/show.html.twig | 14 +++++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 app/Resources/views/member/_partial/info_misc.html.twig diff --git a/app/Resources/views/member/_partial/info_misc.html.twig b/app/Resources/views/member/_partial/info_misc.html.twig new file mode 100644 index 000000000..f3ab053d0 --- /dev/null +++ b/app/Resources/views/member/_partial/info_misc.html.twig @@ -0,0 +1,3 @@ +

Date de création du compte-membre : {{ member.createdAt | date_fr_full }}

+ +

Date du tout premier créneau : {% if member.firstShiftDate %}{{ member.firstShiftDate | date_fr_full }}{% else %}Néant{% endif %}

diff --git a/app/Resources/views/member/_partial/shifts.html.twig b/app/Resources/views/member/_partial/shifts.html.twig index c86271267..53030f5d1 100644 --- a/app/Resources/views/member/_partial/shifts.html.twig +++ b/app/Resources/views/member/_partial/shifts.html.twig @@ -1,5 +1,3 @@ -{% set firstShiftDate = member.firstShiftDate %} - {% if member.isCurrentlyExemptedFromShifts() %} {% include "member/_partial/exempted.html.twig" with { member: member, from_admin: true } %} {% endif %} @@ -42,5 +40,3 @@ {% endif %} {% endfor %} - -

Date du tout premier créneau : {% if firstShiftDate %}{{ firstShiftDate | date_fr_full }}{% else %}Néant{% endif %}

diff --git a/app/Resources/views/member/show.html.twig b/app/Resources/views/member/show.html.twig index 0c651baa7..4c7637631 100644 --- a/app/Resources/views/member/show.html.twig +++ b/app/Resources/views/member/show.html.twig @@ -387,7 +387,7 @@ verified_userRôles
- {% include "member/_partial/roles.html.twig" %} + {% include "member/_partial/roles.html.twig" with { member: member } %}
{% endif %} @@ -428,6 +428,18 @@ {% endif %} + + + {% if is_granted("ROLE_USER_MANAGER") %} +
  • + +
    + {% include "member/_partial/info_misc.html.twig" with { member: member } %} +
    +
  • + {% endif %} {% endblock %}