From ed68325fd7d82cdc670426204779bb3b1a102768 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Wed, 30 Aug 2023 16:38:38 +0200 Subject: [PATCH] Member: create new info section --- .../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 %}