1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!-- Modal -->
<div class="modal fade" id="roleGroupeModal" tabindex="-1" role="dialog" aria-labelledby="roleGroupeModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="roleGroupeModalTitle">{{ 'Choix du rôle'|trans }}</h5>
</div>
<div class="modal-body">
<div class='row'>
{% if app.user %}
{% for group in app.user.possiblegroups %}
{% for role in group.roles %}
{% if role == 'ROLE_PRESTATAIRE' %}
{% for presta in app.user.prestataires %}
<div class='col-6 text-center p-2'>
<a role="button" class="btn btn-default btn-secondary" href='{{path('presta_choice', {'prestaid' : presta.id, 'usergrpid': group.id})}}'>{{ group.name|trans }} - {{presta}} </a>
</div>
{% endfor %}
{% elseif role == 'ROLE_CAISSIER' %}
{% for presta in app.user.caissiers %}
<div class='col-6 text-center p-2'>
<a role="button" class="btn btn-default btn-secondary" href='{{path('presta_choice', {'prestaid' : presta.id, 'usergrpid': group.id})}}'>{{ group.name|trans }} - {{presta}} </a>
</div>
{% endfor %}
{% elseif role == 'ROLE_COMPTOIR' %}
{% for comptoir in app.user.comptoirsgeres %}
<div class='col-6 text-center p-2'>
<a role="button" class="btn btn-default btn-secondary" href='{{path('comptoir_choice', {'cptid' : comptoir.id, 'usergrpid': group.id})}}'>{{ group.name|trans }} - {{comptoir}} </a>
</div>
{% endfor %}
{% elseif role == 'ROLE_CONTACT' or role == 'ROLE_GESTION_GROUPE' %}
{% for groupe in app.user.groupesgeres %}
<div class='col-6 text-center p-2'>
<a role="button" class="btn btn-default btn-secondary" href='{{path('groupe_choice', {'grpid' : groupe.id, 'usergrpid': group.id})}}'>{{ group.name|trans }} - {{groupe}} </a>
</div>
{% endfor %}
{% elseif role == 'ROLE_ADHERENT' or role == 'ROLE_ADMIN_SIEGE' or role == 'ROLE_REDACTEUR' or role == 'ROLE_CONTROLEUR' or role == 'ROLE_SUPER_ADMIN' %}
<div class='col-6 text-center p-2'>
<a role="button" class="btn btn-default btn-secondary" href='{{path('usergroup_choice', {'id': group.id})}}'>{{ group.name|trans }}</a>
</div>
{% elseif role == 'ROLE_TRESORIER' %}
{# TRESORIER GLOBAL #}
{% if app.user.groupesgeres|length <= 0 %}
<div class='col-6 text-center p-2'>
<a role="button" class="btn btn-default btn-secondary" href='{{path('usergroup_choice', {'id': group.id})}}'>{{ group.name|trans }}</a>
</div>
{% else %}
{# TRESORIER DE GROUPE LOCAL #}
{% for groupe in app.user.groupesgeres %}
<div class='col-6 text-center p-2'>
<a role="button" class="btn btn-default btn-secondary" href='{{path('groupe_choice', {'grpid' : groupe.id, 'usergrpid': group.id})}}'>{{ group.name|trans }} - {{groupe}} </a>
</div>
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ 'Annuler'|trans }}</button>
</div>
</div>
</div>
</div>