<details open class="block_edition clearfix" id="divEntete">
    <summary class="titre_block">
        {{ 'Détails campagne' | trad ~ ' ' ~ id }}
    </summary>
    <div class="clearfix">
        <div class="colonne2">
            <div class="informations">
                <p style="display: {{ campaign.DESCRIPT == '' ? 'none' : 'block' }}">
                    <span class="champs_label">{{ 'Description' | trad }}</span>
                    <span class="resultat">{{ campaign.DESCRIPT }}</span>
                </p>
                <p style="display: {{ campaign.STATUT == '' ? 'none' : 'block' }}">
                    <span class="champs_label">{{ 'Statut' | trad }}</span>
                    <span class="resultat">
                        {{ campaign.LIBSTATUT ?? '' }}
                    </span>
                </p>
                {% if campaign.LIBELLE %}
                <p style="display: {{campaign.LIBELLE == '' ? 'none' : 'block'}}">
                    <span class="champs_label">{{ 'Libellé' | trad }}</span>
                    <span class="resultat">{{ campaign.LIBELLE }}</span>
                </p>
                {% endif %}
               <p>
                {% if companiesList is not empty and companiesList|length > 1 %}
                    <span class="champs_label">{{ 'Sociétés' | trad }}</span>
                    {% for companie in companiesList %}
                        <span class="resultat">{{ companie | societeTrad ~ ' (' ~ companie ~ ') ' }}</span>
                    {% endfor %}
                {% elseif companiesList is not empty and companiesList|length == 1 %}
                    <span class="champs_label">{{ 'Société' | trad }}</span>
                    {% for companie in companiesList %}
                        <span class="resultat">{{ companie | societeTrad ~ ' (' ~ companie ~ ') ' }}</span>
                    {% endfor %}
                {% else %}
                    <span class="champs_label">{{ 'Toutes les sociétés' | trad }}</span>
                    <span class="resultat">{{ 'oui' }}</span>
                {% endif %}             
                </p>
                {% if campaign.ID_GRILLE %}
                <p style="display: {{campaign.ID_GRILLE == '' ? 'none' : 'block'}}">
                    <span class="champs_label">{{ 'Catégorie' | trad }}</span>
                    <span class="resultat">{{ campaign.ID_GRILLE }}</span>
                </p>
                {% endif %}
                {% if campaign.COD_PER %}
                <p style="display: {{campaign.COD_PER == '' ? 'none' : 'block'}}">
                    <span class="champs_label">{{ 'Période' | trad }}</span>
                    <span class="resultat">{{ campaign.COD_PER }}</span>
                </p>
                {% endif %}
            </div>
        </div>
        <div class="colonne2 last">
            <div class="informations">
                <p style="display: {{ campaign.DTEVALID == '00000000' or campaign.DTEVALID == '' ? 'none' : 'block' }}">
                    <span class="champs_label">{{ 'Date de validation' | trad }}</span>
                    <span class="resultat">{{ campaign.DTEVALID | dateTrad }}</span>
                </p>
                <p style="display: {{ campaign.DTEDEB_PREVUE == '00000000' or campaign.DTEDEB_PREVUE == '' ? 'none' : 'block' }}">
                    <span class="champs_label">{{ 'Date de début prévue' | trad }}</span>
                    <span class="resultat">{{ campaign.DTEDEB_PREVUE | dateTrad }}</span>
                </p>
               <p>
                    <span class="champs_label">{{ 'Heure de début prévue' | trad }}</span>
                    <span class="resultat">{{ campaign.HEUREDEB_PREVUE | heureTrad }}</span>
               </p>
                <p style="display: {{ campaign.DTEFIN_PREVUE == '00000000' or campaign.DTEFIN_PREVUE == '' ? 'none' : 'block' }}">
                    <span class="champs_label">{{ 'Date de clôture prévue' | trad }}</span>
                    <span class="resultat">{{ campaign.DTEFIN_PREVUE | dateTrad }}</span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Heure de clôture prévue' | trad }}</span>
                    <span class="resultat">{{ campaign.HEUREFIN_PREVUE | heureTrad }}</span>
                </p>
                <p style="display: {{ campaign.DTEFIN == '00000000' or campaign.DTEFIN == '' ? 'none' : 'block' }}">
                    <span class="champs_label">{{ 'Date de clôture' | trad }}</span>
                    <span class="resultat">{{ campaign.DTEFIN | dateTrad }}</span>
                </p>
                {% if campaign.CREEEPAR %}
                <p>
                    <span class="champs_label">{{ 'Créé par' | trad }}</span>
                    <span class="resultat">{{ campaign.CREEEPAR }}</span>
                </p>
                {% endif %}
                {% if campaign.DTECREAT %}
                <p style="display: {{ campaign.DTECREAT == '00000000' or campaign.DTECREAT == '' ? 'none' : 'block' }}">
                    <span class="champs_label">{{ 'Date de création' | trad }}</span>
                    <span class="resultat">{{ campaign.DTECREAT | dateTrad }}</span>
                </p>
                {% endif %}
            </div>
        </div>
    </div>
</details>

<style>
    summary::after {
        margin: -15px 0 0;
        width: 0;
        float: right;
        transform: rotate(90deg);
        content: "\203A";
        font-size: 30px;
    }
    details[open] summary::after {
        margin: -5px 5px 0 0;
        transform: rotate(-90deg);
        content: "\203A";
    }
</style>
