{% set public = public is defined ? public : false %}
{% macro cell(name, value) %}
{% if isMobile() %}
<td class=""><span class="regular upper p-alt">{{name}}</span>
<br><span class="semibold">{{ value }}</span></td>
{% else %}
<th class="regular upper nowrap">{{name}}</th>
<td><span class="semibold">{{ value }}</span></td>
{% endif %}
{% endmacro %}
<div class=" {{isMobile() ? 'padding-10' : 'padding-20'}} h4" style="min-height: 100%">
<div class='record-box bg-white bottom-20 text-left {{desktop("flex row")}} {{mobile("flex col center")}}'>
<div class="flex row space bottom-20 {{desktop('right-40 third top-25-in')}}">
<div class="flex col center w100">
<figure class="w100 hoverflow relative shadow-alt {{not item.picture ? 'padding-20'}}" style="">
{% if item.picture %}
<img src="{{asset(item.picture.thumbnail)}}" class="block w100 os-image " data-image="{{item.picture ? asset(item.picture.file)}}">
{% endif %}
</figure>
<div>
<h3 class="success-alt top-20">{{item.lname}} {{item.fname}}</h3>
</div>
</div>
</div>
<table class="record w100">
<tbody>
<tr>
<td class="nopadding" colspan="{{desktop('2')}}">
<strong class="extrabold h4 success-alt top-25-in bottom-10-in block">ÉTAT CIVIL</strong>
</td>
</tr>
<tr>{{ _self.cell("Civilité :",item.civility)}}</tr>
<tr>{{ _self.cell("Nom :",item.fname)}}</tr>
<tr>{{ _self.cell("Prénom(s) :",item.lname)}}</tr>
{% if item.status %}
<tr>{{ _self.cell("Statut :",item.status.label)}}</tr>
{% endif %}
<tr>{{ _self.cell("Fonction :",item.function)}}</tr>
<tr>{{ _self.cell("Nationalité :",item.nationality ? item.nationality|country)}}</tr>
<tr>
<td class="nopadding" colspan="{{desktop('2')}}">
<strong class="extrabold h4 success-alt top-25-in bottom-10-in block">ENTITÉ</strong>
</td>
</tr>
<tr>{{ _self.cell("Structure :",item.company)}}</tr>
<tr>{{ _self.cell("Pays :",item.country ? item.country|country)}}</tr>
<tr>{{ _self.cell("Ville :",item.town)}}</tr>
<tr>{{ _self.cell("Adresse :",item.address)}}</tr>
<tr>
<td class="nopadding" colspan="{{desktop('2')}}">
<strong class="extrabold h4 success-alt top-25-in bottom-10-in block">CONTACTS ET RÉSEAUX SOCIAUX</strong>
</td>
</tr>
<tr>{{ _self.cell("Email :",item.email)}}</tr>
<tr>{{ _self.cell("Téléphone :",item.phone)}}</tr>
<tr>{{ _self.cell("Facebook :",item.facebook)}}</tr>
<tr>{{ _self.cell("Twitter :",item.twitter)}}</tr>
<tr>{{ _self.cell("LinkedIn :",item.linkedin)}}</tr>
<tr>{{ _self.cell("Whatsapp :",item.whatsapp)}}</tr>
<tr>
<td class="nopadding" colspan="{{desktop('2')}}">
<strong class="extrabold h4 success-alt top-25-in bottom-10-in block">DOCUMENT DE VOYAGE</strong>
</td>
</tr>
<tr>{{ _self.cell("Type de document :",item.passeportType)}}</tr>
<tr>{{ _self.cell("N° du document :",item.passeport)}}</tr>
<tr>{{ _self.cell("Date de délivrance :",item.passeportIssueDate ? item.passeportIssueDate|frdate)}}</tr>
<tr>{{ _self.cell("Date d'expiration :",item.passeportExpirationDate ? item.passeportExpirationDate|frdate)}}</tr>
<tr>
<td class="nopadding" colspan="{{desktop('2')}}">
<strong class="extrabold h4 success-alt top-25-in bottom-10-in block">TRAJET VERS COTONOU</strong>
</td>
</tr>
<tr>{{ _self.cell("Compagnie de voyage :",item.travelArrivalCompany)}}</tr>
<tr>{{ _self.cell("Numéro de vol :",item.travelArrivalFlight)}}</tr>
<tr>{{ _self.cell("Point d'arrivée :",item.travelArrivalPoint)}}</tr>
<tr>{{ _self.cell("Date d'arrivée :",item.travelArrivalDate ? item.travelArrivalDate|frdate)}}</tr>
<tr>{{ _self.cell("Heure d'arrivée :",item.travelArrivalTime ? item.travelArrivalTime|date("H\\H i"))}}</tr>
<tr>
<td class="nopadding" colspan="{{desktop('2')}}">
<strong class="extrabold h4 success-alt top-25-in bottom-10-in block">TRAJET DE RETOUR</strong>
</td>
</tr>
<tr>{{ _self.cell("Compagnie de voyage :",item.travelDepartureCompany)}}</tr>
<tr>{{ _self.cell("Numéro de vol :",item.travelDepartureFlight)}}</tr>
<tr>{{ _self.cell("Point de départ :",item.travelDeparturePoint)}}</tr>
<tr>{{ _self.cell("Date de départ :",item.travelDepartureDate ? item.travelDepartureDate|frdate)}}</tr>
<tr>{{ _self.cell("Heure de départ :",item.travelDepartureTime ? item.travelDepartureTime|date("H\\H i"))}}</tr>
<tr>
<td class="nopadding" colspan="{{desktop('2')}}">
<strong class="extrabold h4 success-alt top-25-in bottom-10-in block">PROGRAMMES SÉLECTIONNÉS</strong>
</td>
</tr>
{% for o in item.programs %}
<tr>{{ _self.cell(o.isMinistersMeeting ? "Réunion des ministres":"Réunion des experts",o.date|frdate(1))}}</tr>
{% else %}
<tr>{{ _self.cell("","Aucun")}}</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if is_granted('ROLE_USER') %}
<div class="hz-20-in vt-30-in text-center adapt shadow radius-5 bg-white top-20">
{% if item.confirmedAt %}
<span class="os-confirm btn btn-success-alt upper semibold shadow radius-5 right-10 pointer" data-confirm-href="{{path('participants-validate',{'id':item.id})}}">
<i class="fa fa-check"></i>
<span>Valider l'inscription</span>
</span>
{% else %}
<div class="padding-20 text-center">
<span class="h3 semibold error">Inscription non confirmée par le participant.</span>
</div>
{% endif %}
</div>
{% else %}
<div class="hz-20-in vt-30-in text-center radius-5 top-20">
{% if public and item.confirmedAt is null %}
<span class="hz-30-in vt-10-in bg-success white upper bold h4 right-10 os-confirm pointer radius-5" data-confirm-class="" data-confirm-href="{{path('inscription-confirm',{'token':item.token})}}">
<i class='fa fa-check right-10'></i>
<span>Confirmer{{desktop(" ma demande")}}</span>
</span>
{% endif %}
{% if public %}
<a class="hz-30-in vt-10-in bg-success-alt white upper bold h4 left-10 radius-5" href="{{path('inscription-edit',{'token':item.token})}}">
<i class='fa fa-pen right-10'></i>
<span>Modifier{{desktop(" mes infos")}}</span>
</a>
{% endif %}
</div>
{% endif %}
</div>