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
{% set cotisations = getAllFlux(app.user, app.request, 'cotisation') %}
{% if cotisations|length > 0 %}
{% set idcard = 'cotisationspresta' %}
{% extends '@kohinos/block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-clipboard-list mr-4"></i> {{ 'Mes cotisations'|trans }}
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
{% block blockcontent %}
{% if false == isCotisationValid(app.user) %}
{% if cotisations|length > 0 %}
<div class='text-danger mb-3'>{{ 'Votre dernière cotisation est arrivée à expiration, veuillez cotiser de nouveau pour accéder aux fonctionnalités de votre compte !'|trans }}</div>
{% else %}
<div class='text-danger mb-3'>{{ 'Si vous souhaitez utiliser les fonctionnalités de votre compte, vous devez avoir une cotisation valide !'|trans }}</div>
{% endif %}
{% endif %}
<ul class='list-group'>
{% if cotisations|length <= 0 %}
<em>{{ 'Aucunes cotisations à ce jour'|trans }}</em>
{% else %}
{% for cotisation in cotisations %}
<li class="list-group-item"><span class='btn btn-xs btn-primary disabled'>{{cotisation.annee|upper}}</span> <b>{{cotisation.montant}}€</b> <em> {{ 'payée le'|trans }} {{cotisation.createdAt|date('d/m/Y')}} en {{cotisation.moyen}}</em></li>
{% endfor %}
{% endif %}
</ul>
{% set cotisEnd = false %}
{% if (app.user and is_granted('ROLE_ADHERENT') and app.user.adherent) %}
{% set cotisEnd = isCotisationValidForAdherent(app.user.adherent) %}
{% elseif (app.user and is_granted('ROLE_PRESTATAIRE') and app.session.has('_prestagere')) %}
{% set cotisEnd = isCotisationValidForPresta(app.session.get('_prestagere')) %}
{% endif %}
{% if false != cotisEnd %}
<span class='btn btn-secondary disabled mt-2' disabled='disabled'>
{{ 'Votre cotisation est à jour'|trans }}
</span>
{% else %}
<a class='btn btn-xs btn-primary mt-2' href='{{ path('cotiser') }}'>
{{ 'Cotiser'|trans }}
</a>
{% endif %}
{% endblock blockcontent %}
{% endif %}