{% extends 'menu_left.html.twig' %}


{% block title %} Informations dossier d'aide {% endblock %}

{% block main %}
    {% if app.request.query.has('searchedValue') %}
        {% set searchedValue =  app.request.query.all['searchedValue'] %}
    {% endif %}
    {% if app.request.query.has('pageNumber') %}
        {% set pageNumber =  app.request.query.all['pageNumber'] %}
    {% endif %}

    <div class="container-fluid">

        <div id="dossier-aide-intro" class="row plr-16 ptb-24">
            <!-- INTRO-->
            <div class="col-xs-12 p-0">
                <div class="bloc-base p-16">
                    <p><a href="{{ path('participations_list') }}{% if searchedValue is defined and pageNumber is defined %}?searchedValue={{ searchedValue }}&pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is not defined and pageNumber is defined %}?pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is defined and pageNumber is not defined %}?searchedValue={{ searchedValue }}{% endif %}"
                          class="button-rond-xs align-middle mr-8"><i class="fas fa-arrow-left"></i></a>Participations financières</p>
                </div>
            </div>
        </div>

        {% if not entete is null and not entete.texte==''%}
            <div class="col-xs-12 p-0">
                <div class="bloc-base p-16">
                    {{ entete.texte|raw }}
                </div>
            </div>
        {% endif %}

        <div id="dossier-aide-tableau" class="row plr-16 ptb-24">
            <!-- TABLEAU-->
            <div class="col-xs-12 p-0">
                <div class="bloc-base p-16">
                    <div class="bloc-title">
                        <div class="row m-0">
                            <div class="col-xs-6 p-0">
                                <h2 class="align-middle">Dossier d'aide N° {{ dossier.numero }}</h2>
                            </div>
                            <div class="col-xs-6 p-0 text-align-r">
                                {% if not previousDossier is null  %}<a href="{{ path('dossier_aide_informations', {dossierID : previousDossier}) }}{% if searchedValue is defined and pageNumber is defined %}?searchedValue={{ searchedValue }}&pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is not defined and pageNumber is defined %}?pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is defined and pageNumber is not defined %}?searchedValue={{ searchedValue }}{% endif %}" id="previous" title="Précédent" class="button-rond-xs align-middle mr-8"><i class="fas fa-arrow-left"></i></a>{% endif %}{% if not nextDossier is null %}<a href="{{ path('dossier_aide_informations', {dossierID : nextDossier}) }}{% if searchedValue is defined and pageNumber is defined %}?searchedValue={{ searchedValue }}&pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is not defined and pageNumber is defined %}?pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is defined and pageNumber is not defined %}?searchedValue={{ searchedValue }}{% endif %}" class="button-rond-xs align-middle" id="next" title="Suivant"><i class="fas fa-arrow-right"></i></a>{% endif %}
                            </div>
                        </div>
                    </div>
                    <div class="row m-0">
                        <div class="col-xs-12 p-0 mt-24 mb-24">
                            <ul id="content-nav-tabs" class="nav divider-grey-b">
                                <li class="pr-24 nav-item active">
                                    <a class="plr-0 pt-0 pb-24 nav-link" href="{{ path('dossier_aide_informations', {dossierID : dossier.numero}) }}{% if searchedValue is defined and pageNumber is defined %}?searchedValue={{ searchedValue }}&pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is not defined and pageNumber is defined %}?pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is defined and pageNumber is not defined %}?searchedValue={{ searchedValue }}{% endif %}">Informations</a>
                                </li>
                                <li class="plr-24 nav-item">
                                    <a class="plr-0 pt-0 pb-24 nav-link" href="{{ path('dossier_aide_modalites', {dossierID : dossier.numero}) }}{% if searchedValue is defined and pageNumber is defined %}?searchedValue={{ searchedValue }}&pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is not defined and pageNumber is defined %}?pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is defined and pageNumber is not defined %}?searchedValue={{ searchedValue }}{% endif %}">Modalités d'aide</a>
                                </li>
                                <li class="plr-24 nav-item">
                                    <a class="plr-0 pt-0 pb-24 nav-link" href="{{ path('dossier_aide_demandes', {dossierID : dossier.numero}) }}{% if searchedValue is defined and pageNumber is defined %}?searchedValue={{ searchedValue }}&pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is not defined and pageNumber is defined %}?pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is defined and pageNumber is not defined %}?searchedValue={{ searchedValue }}{% endif %}">Demandes de paiement</a>
                                </li>
                                <li class="plr-24 nav-item">
                                    <a class="plr-0 pt-0 pb-24 nav-link" href="{{ path('dossier_aide_encaissements', {dossierID : dossier.numero}) }}{% if searchedValue is defined and pageNumber is defined %}?searchedValue={{ searchedValue }}&pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is not defined and pageNumber is defined %}?pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is defined and pageNumber is not defined %}?searchedValue={{ searchedValue }}{% endif %}">Encaissements</a>
                                </li>
                                <li class="plr-24 nav-item">
                                    <a class="plr-0 pt-0 pb-24 nav-link" href="{{ path('dossier_aide_documents', {dossierID : dossier.numero}) }}{% if searchedValue is defined and pageNumber is defined %}?searchedValue={{ searchedValue }}&pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is not defined and pageNumber is defined %}?pageNumber={{ pageNumber }}{% endif %}{% if searchedValue is defined and pageNumber is not defined %}?searchedValue={{ searchedValue }}{% endif %}">Documents</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="row m-0">
                        <div class="col-xs-12 p-0">
                            <div class="bloc-base background-white p-48">
                                <div class="row m-0">
                                    <div class="col-xs-12 col-sm-7 p-0">
                                        <div class="bloc-base">
                                            <div class="row m-0">
                                                <div class="col-xs-12 col-sm-6 p-0 pr-16">
                                                    <p class="font-bold">N° Convention ou Acte d’attribution</p>
                                                    <p class="mb-24">{{ dossier.numero }}</p>
                                                    <p class="font-bold">Objet</p>
                                                    <p class="mb-24">{{ dossier.objet }}</p>
                                                </div>
                                                <div class="col-xs-12 col-sm-6 p-0 pr-16">
                                                    <p class="font-bold">Localisation</p>
                                                    <p class="mb-24">{{ dossier.localisation }}</p>
                                                </div>
                                            </div>
                                            <div class="row m-0">
                                                <div class="col-xs-12 col-sm-6 p-0 pr-16">
                                                    <p class="font-bold">Montant total de l'opération</p>
                                                    <p class="mb-24">{{ dossier.montantTotal|number_format(2,',',' ') }} €</p>
                                                    <p class="font-bold">Montant finançable</p>
                                                    <p class="mb-24">{{ dossier.montantPrevisionnel|number_format(2,',',' ') }} €</p>
                                                </div>
                                                <div class="col-xs-12 col-sm-6 p-0 pr-16">
                                                    <p class="font-bold">Montant mandaté</p>
                                                    <p class="mb-24">{{ dossier.montantMandate|number_format(2,',',' ') }} €</p>
                                                    <p class="font-bold">Montant participation financière</p>
                                                    <p class="mb-24">{{ dossier.montantParticipation|number_format(2,',',' ') }} €</p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-xs-12 col-sm-5 p-0">
                                        <div id="etat-dossier" class="bloc-base pl-48 divider-grey-l">
                                            <div class="row m-0">
                                                <div class="col-xs-12 p-0">
                                                    <p class="font-bold">Notifié le</p>

                                                    {% if '30/11/-0001' not in dossier.dateNotification|date('d/m/Y') and dossier.dateNotification is not null %}
                                                        <p class="mb-24">{{dossier.dateNotification ? dossier.dateNotification|date('d/m/Y') }}</p>
                                                    {% else %}
                                                        <p class="mb-24"></p>
                                                    {% endif %}

                                                    <p class="font-bold">Etat du dossier</p>
                                                    <span class="tag ptb-8 plr-16 mb-24 background-purple">{{ dossier.etat }}</span>
                                                </div>
                                            </div>
                                            <div class="row m-0">
                                                <div class="col-xs-12 p-0">
                                                    <p class="font-bold">Suivi technique par</p>
                                                    <p class="mb-24">{{ dossier.suiviTechniquePar}}</p>
                                                    <p class="font-bold">Suivi administratif par</p>
                                                    <p class="">{{ dossier.suiviFinancePar}}</p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block javascript_inline %}
<script>
$('#previous #next').tooltip({});
</script>
{% endblock %}
