Skip to content

Commit

Permalink
Membre (coté admin) : nouvelle section "informations diverses" (#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Aug 30, 2023
1 parent 0be7d03 commit 6dc04f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions app/Resources/views/member/_partial/info_misc.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p style="margin-top:0">Date de création du compte-membre : {{ member.createdAt | date_fr_full }}</p>

<p>Date du tout premier créneau : {% if member.firstShiftDate %}{{ member.firstShiftDate | date_fr_full }}{% else %}Néant{% endif %}</p>
4 changes: 0 additions & 4 deletions app/Resources/views/member/_partial/shifts.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% set firstShiftDate = member.firstShiftDate %}

{% if member.isCurrentlyExemptedFromShifts() %}
{% include "member/_partial/exempted.html.twig" with { member: member, from_admin: true } %}
{% endif %}
Expand Down Expand Up @@ -42,5 +40,3 @@
{% endif %}
</div>
{% endfor %}

<p>Date du tout premier créneau : {% if firstShiftDate %}{{ firstShiftDate | date_fr_full }}{% else %}Néant{% endif %}</p>
14 changes: 13 additions & 1 deletion app/Resources/views/member/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
<i class="material-icons">verified_user</i>Rôles
</div>
<div class="collapsible-body white">
{% include "member/_partial/roles.html.twig" %}
{% include "member/_partial/roles.html.twig" with { member: member } %}
</div>
</li>
{% endif %}
Expand Down Expand Up @@ -428,6 +428,18 @@
</div>
</li>
{% endif %}

<!-- Informations sur le membre -->
{% if is_granted("ROLE_USER_MANAGER") %}
<li id="super">
<div class="collapsible-header {% if frontend_cookie and frontend_cookie.user_show is defined and frontend_cookie.user_show.admin_open is defined and frontend_cookie.user_show.info_open %}active{% endif %}">
<i class="material-icons">info_outline</i>Informations diverses
</div>
<div class="collapsible-body white">
{% include "member/_partial/info_misc.html.twig" with { member: member } %}
</div>
</li>
{% endif %}
</ul>
{% endblock %}

Expand Down

0 comments on commit 6dc04f9

Please sign in to comment.