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
67
68
69
70
71
72
73
74
75
76
77
{% include '@kohinos/block/demo_shortcut.html.twig' %}
{# ACTIONS PRINCIPALES POUR CHAQUE UTILISATEUR CONNECTE #}
<div id="accordion">
{% if not app.request.session.has('_choixGroup') %}
{#
// @TODO : Ajouter des raccourcis en fonction des droits de l'utilisateur :
- ajout d'un adhérent (avec reception de la cotisation en comptoir par exemple)
- ajout d'un prestataire (avec reception de la cotisation en comptoir par exemple)
{% if app.user and is_granted('ROLE_ADMIN_ADHERENT_GERER_CREATE') %}
<a href='{{ path('adherent_create') }}' class='btn btn-secondary'>Créer un nouvel adhérent</a>
{% endif %} #}
{% if app.user and is_granted('ROLE_ADMIN_SIEGE') %}
{% include '@kohinos/block/admin_siege.html.twig' %}
{# Rien à ajouter pour un rédacteur #}
{# {% elseif app.user and is_granted('ROLE_REDACTEUR') %} #}
{% elseif app.user and is_granted('ROLE_TRESORIER') or is_granted('ROLE_CONTROLEUR') %}
{% include '@kohinos/block/soldes_siege.html.twig' %}
{# {% include '@kohinos/block/soldegroupes.html.twig' %} #}
{% elseif app.user and is_granted('ROLE_GESTION_GROUPE') %}
{% include '@kohinos/block/admin_groupe.html.twig' %}
{% elseif app.user and is_granted('ROLE_COMPTOIR') %}
{% include '@kohinos/block/admin_comptoir.html.twig' %}
{% if tav_env %}
<a href='{{ path('adherent_create') }}' rel="noopener noreferrer" class='ml-2 text-center'><i class="fa fa-plus mr-2" aria-hidden="true"></i> Inscrire/modifier un habitant</a><br/><br/>
{% endif %}
{% elseif app.user and is_granted('ROLE_CONTACT') %}
{% include '@kohinos/groupe/block/infos.html.twig' %}
{% elseif app.user and is_granted('ROLE_SUPER_ADMIN') %}
{% include '@kohinos/block/soldes_siege.html.twig' %}
{% elseif app.user and is_granted('ROLE_PRESTATAIRE') and getCurrentPrestataire() != null %}
{% include '@kohinos/block/admin_prestataire.html.twig' %}
{% elseif app.user and is_granted('ROLE_CAISSIER') and getCurrentPrestataire() != null %}
{% include '@kohinos/block/admin_caissier.html.twig' %}
{% elseif app.user and is_granted('ROLE_ADHERENT') and app.user.adherent %}
{% include '@kohinos/block/admin_adherent.html.twig' %}
{% else %}
{# User not loggued #}
{% endif %}
{# Valider les demandes d'achat de monnaie si on a le droit #}
{% if app.user and is_granted('ROLE_VALIDE_ACHAT') %}
{# @TODO : ajouter un raccourcis pour valider les demandes d'achat + un nombre #}
{% endif %}
{# Affichage de la carte des prestataires pour les adhérents #}
{% if KOH_USE_WORDPRESS is defined and KOH_USE_WORDPRESS == 'false' and ((app.user and is_granted('ROLE_ADHERENT')) or not app.user) %}
<div class='d-none d-md-block'>
{% include '@kohinos/presta/block/carte.html.twig' with {'title': 'Situer les Prestataires'|trans}%}
</div>
{% endif %}
{% if app.user and is_granted('ROLE_ADMIN') %}
<a href='http://wiki.kohinos.net/doku.php?id=doc:doc' target='_blank' rel="noopener noreferrer" class='ml-2 text-center'><i class="fa fa-book mr-2" aria-hidden="true"></i> Documentation utilisateur</a>
{% endif %}
{% endif %}
</div>