@include('forms.fbncheader')
@include('forms.fdatatables')


{!! Html::style('css/bootstrap-select.min.css') !!}
{!! Html::style('css/datepicker3.css') !!}

<div style=""  class="col-lg-max col-lg-offset-1 container-fluid">

<div style="padding-left:0px" class="col-lg-12">
     <h2>Bénéficiaires avec dates de naissance identique</h2
</div>

<div class='col-lg-max' style="padding-top:5px">
    <div class="">
        <table id="_table" style="background-color:white" 
            class="table table-striped table-bordered table-hover" width="100%" 
            >
            <thead>
                <tr>
                    <th width='1%'>Id</th>
                    <th width='30%'>Nom</th>
                    <th width='5%'>Date de naissance</th>
                    <th width='1%'>NbEnf.</th>
                    <th width='30%'>Conjoint</th>
                    <th width='30%'>Employeur</th> 
                    <th width='1%'>Statut</th>
                </tr>
            </thead>
 
            <tbody>
                @foreach ($beneficiaires as $beneficiaire)
                <tr class="" >
                    <td>{!! str_pad($beneficiaire->id, 6, "0", STR_PAD_LEFT) !!}</td>
                    <td>{!! $beneficiaire->nom_complet !!}</td>
                    <td>{!! $beneficiaire->datenaiss !!}</td>
                    <td align="center">{!! $beneficiaire->nb_enf."/".$beneficiaire->nb_enf_tot !!}</td>
                    <td>{!! $beneficiaire->nom_conjoint !!}</td>
                    <td>{!! $beneficiaire->employeur_court !!}</td>   
                    <td align="center">{!! $beneficiaire->statut !!}</td>
                </tr>
                @endforeach
            </tbody>
        </table>
        

    </div>

</div>

</div>

</body></html>


<script>
$(document).ready(function() {
   $.fn.dataTable.moment('D/M/YYYY');

    var table =$('#_table').dataTable( {
        bAutoWidth: false,
        bPaginate: true,
        bInfo: true,
        bFilter: true,
        deferRender:    true,
        scrollCollapse: false,
        scroller:       false,

        iDisplayLength:10,
        oLanguage: {
            "sZeroRecords": "Aucune ligne",
            "sInfo": "Affichage de _START_ &agrave; _END_ sur _TOTAL_ lignes",
            "sInfoEmpty": "Showing 0 to 0 of 0 records",
            "sInfoFiltered": "(sur un total de _MAX_ lignes)",
            "oPaginate": {"sPrevious": "Pr&eacute;c&eacute;dente","sNext": "Suivante"
                ,"sFirst": "Premi&egrave;re","sLast": "Derni&egrave;re"},
                "sSearch":"Chercher ",
            buttons: {
                colvis: 'Colonnes à afficher',
                copy: 'Copier',
                print: 'Imprimer',
                copyTitle: 'Ajouté au presse-papiers',
                copyKeys: 'Appuyez sur <i>ctrl</i> ou <i>\u2318</i> + <i>C</i> pour copier les données du tableau à votre presse-papiers. <br><br>Pour annuler, cliquez sur ce message ou appuyez sur Echap.',
                copySuccess: {
                    _: '%d lignes copiées',
                    1: '1 ligne copiée'
                }
            }

            },
            dom: "<'row'<'col-sm-4 text-left'f><'col-sm-4'><'col-sm-6 text-right'B>>" +
            "<'row'<'col-sm-12'tr>>" +
            "<'row'<'col-sm-5'i><'col-sm-7'p>>",

            buttons: [ 
                {extend: 'copy',exportOptions: {columns: ':visible'} },
                {extend: 'excel',exportOptions: {columns: ':visible'} },
                {extend: 'pdf',exportOptions: {columns: ':visible'} },
                {extend: 'print',exportOptions: {columns: ':visible'} },
                'colvis'
            ],

            "aaSorting": [
                [2,'desc']
            ],

        } );





} );
</script>

