<table id="datatables_etudiant" class="display" style="width:100%"> <thead> <tr> <th>ID Ins</th> <th>Code Ins</th> <th>Code ADM</th> <th>Nom</th> <th>Prenom</th> <th>Niveau</th> {% set x=1 %} {% for key, cycle in cycles %} <th title="{{cycle.designation[0]}}">Stage {{key+1}} {% set x=x+1 %} </th> {% endfor %} </tr> </thead> <tbody> {% for data in datas %} <tr> <td>{{data.inscription.id}}</td> <td>{{data.inscription.ins_code}} </td> <td>{{data.inscription.adm_code}} </td> <td>{{data.inscription.nom}} </td> <td>{{data.inscription.prenom}} </td> <td>{{data.inscription.niveau}} </td> {% for stage in data.stages %} <td> {% if stage.fmaglobal is not null or stage.fpaglobal is not null or stage.fdaglobal is not null %} {% set rapport = "" %} {% set note = false %} {% if stage.fmaglobal is not null %} {% set rapport = stage.fmaglobal.id %} {% set note = stage.fmaglobal.note %} {% elseif stage.fpaglobal is not null %} {% set rapport = stage.fpaglobal.id %} {% set note = stage.fpaglobal.note %} {% elseif stage.fdaglobal is not null %} {% set rapport = stage.fdaglobal.id %} {% set note = stage.fdaglobal.note %} {% endif %} <a href="{{path('rapport_stageDetails', {rapport: rapport})}}" target="_blank" > Global {% if note %} (Note: {{note}}) {% endif %} </a> {% else %} {% if stage.clinique is not null or stage.simulation is not null %} {% if stage.clinique is null %} {% if stage.hopital is null %} - {% else %} <a href="{{path('rapport_stageDetails', {rapport: stage.hopital.id})}}" target="_blank" > Hopital {% if stage.hopital.note %} (Note: {{stage.hopital.note}}) {% endif %} </a> {% endif %} {% else %} <a href="{{path('rapport_stageDetails', {rapport: stage.clinique.id})}}" target="_blank" > Clinique {% if stage.clinique.note %} (Note: {{stage.clinique.note}}) {% endif %} </a> {% endif %} | {% if stage.simulation is null %} - {% else %} <a href="{{path('rapport_stageDetails', {rapport: stage.simulation.id})}}" target="_blank" > Simulation {% if stage.simulation.note %} (Note: {{stage.simulation.note}}) {% endif %} </a> {% endif %} {% elseif stage.staff is not null or stage.hopital is not null %} {% if stage.staff is null %} - {% else %} <a href="{{path('rapport_stageDetails', {rapport: stage.staff.id})}}" target="_blank" > Staff {% if stage.staff.note %} (Note: {{stage.staff.note}}) {% endif %} </a> {% endif %} | {% if stage.hopital is null %} - {% else %} <a href="{{path('rapport_stageDetails', {rapport: stage.hopital.id})}}" target="_blank" > Hopital {% if stage.hopital.note %} (Note: {{stage.hopital.note}}) {% endif %} </a> {% endif %} {% elseif stage.pharmacy is not null%} <a href="{{path('rapport_stageDetails', {rapport: stage.pharmacy.id})}}" target="_blank" > Pharmacy {% if stage.pharmacy.note %} (Note: {{stage.pharmacy.note}}) {% endif %} </a> {% elseif stage.dentaire is not null %} {% if stage.dentaire is null %} - {% else %} <a href="{{path('rapport_stageDetails', {rapport: stage.dentaire.id})}}" target="_blank" > Dentaire {% if stage.dentaire.note %} (Note: {{stage.dentaire.note}}) {% endif %} </a> {% endif %} {% endif %} {% endif %} </td> {% endfor %} </tr> {% endfor %} </tbody> {# <tfoot> <tr> <th>Etudiant Infos</th> {% for cycle in cycles %} <th>{{cycle.cycle}}</th> {% endfor %} </tr> </tfoot> #}</table>