From b5b10357555063ca3903fbb6db9154fcb8d8f088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Pileck=C3=BD?= Date: Sat, 25 May 2024 10:46:40 +0200 Subject: [PATCH] optimized admin paid view --- .../translatable/widgets/participantRow.twig | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/src/Templates/translatable/widgets/participantRow.twig b/src/Templates/translatable/widgets/participantRow.twig index eb579817..9e8dce42 100755 --- a/src/Templates/translatable/widgets/participantRow.twig +++ b/src/Templates/translatable/widgets/participantRow.twig @@ -1,37 +1,17 @@ {{ person.getFullName }} {% if person is PatrolLeader %} - {{ person.getPatrolParticipantsCount }} {% trans %}stats-admin.numberPatrolParticipantsTotal{% endtrans %} -{% endif %}{% if person is TroopLeader %} +{% elseif person is TroopLeader %} - {{ person.getTroopParticipantsCount }} {% trans %}stats-admin.numberPatrolParticipantsTotal{% endtrans %} {% endif %} {% if ca.contingent %} - {{ person.getContingent|trans }} -{% endif %}{% if ca.email %} +{% endif %} +{% if ca.email %} - {{ person.getEmail }} -{% elseif person.getUser %} +{% elseif person.user %} - {{ person.user.email }} {% endif %} -{% if person.deals %} - - - {% for participantDeal in person.deals %} - {{ participantDeal.slug }}{% if not participantDeal.isDone %} ❌{% else %} ✅{% endif %}{{ not loop.last ? ' | ' }} - {% endfor %} -{% else %} - {% for eventDeal in event.eventType.getEventDeals(person) %} - {{ eventDeal.slug }} ❌{{ not loop.last ? ' | ' }} - {% endfor %} -{% endif %} - -{% if person is not PatrolParticipant %} -
- -
-{% endif %} -{# TODO add placeholder for PL "not supported yet" #} {% include 'widgets/participantRow.twig' with {'person': patrolParticipant, 'ca': caPp} %} {% endfor %}
-{% endif %}{% if person is TroopLeader %} +{% elseif person is TroopLeader %} {% for troopParticipant in person.troopParticipants %}
{% include 'widgets/participantRow.twig' with {'person': troopParticipant, 'ca': caTp} %} {% endfor %}