<html>
<head>
{!! Html::style('css/jquery-ui.min.css') !!}
{!! Html::style('css/jquery-ui.structure.min.css') !!}
{!! Html::style('css/jquery-ui.theme.min.css') !!}
{!! Html::style('css/bootstrap.min.css') !!}
{!! Html::style('css/magicsuggest-min.css') !!}

{!! Html::style('css/jquery.fancybox.css') !!}
{!! Html::style('css/jquery.fancybox-buttons.css') !!}

{!! Html::script('js/jquery.min.js') !!}
{!! Html::script('js/jquery-ui.min.js') !!}
{!! Html::script('js/bootstrap.min.js') !!}
{!! Html::script('js/magicsuggest.js') !!}
{!! Html::script('js/jquery.fancybox.js') !!}
{!! Html::script('js/jquery.jeditable.js') !!}
</head>


<body>
    <div class="table-responsive">
        <table id="_table" class="table table-condensed table-striped table-bordered">
            <thead>
                <tr>
                    <th width='1%'>Id</th>
                    <th>Nom</th>
                    <th width='20%'>Prenom</th>
                    <th width='1%'>Sexe</th>
                    <th width='1%'>Certificat</th>
                    <th width='5%'>Date de naissance</th>
                    <th width='20%'>Responsable</th>
                    <th width='20%'>Conjoint</th>
                    <th width='185px'></th>
                </tr>
            </thead>

            <tbody>
                @foreach ($enfants as $enfant)
                <tr>
                    <td>{!! str_pad($enfant->id, 6, "0", STR_PAD_LEFT) !!}</td>
                    <td nowrap>{!! $enfant->nom !!}</td>
                    <td nowrap>{!! $enfant->prenom !!}</td>
                    <td nowrap>{!! $enfant->sexe !!}</td>
                    <td nowrap>{!! $enfant->certif !!}</td>
                    <td nowrap>{!! $enfant->datenaiss !!}</td>
                    <td nowrap>{!! $enfant->nom_responsable !!}</td>
                    <td nowrap>{!! $enfant->nom_conjoint  !!}</td>
                    <td nowrap>
                    @if($user->can("ENF_MAJ") || $user->HasRole("Administrateur"))
                        <a href="./enfants/{!! $enfant->id !!}/edit" class="btn btn-info pull-left" style="margin-right: 3px;">Modifier</a>
                    @endif
                    @if($user->can("ENF_SUP") || $user->HasRole("Administrateur"))
                        {!! Form::open(['url' => '/tiers/enfants/' . $enfant->id, 'method' => 'DELETE']) !!}
                        {!! Form::submit('Supprimer', ['class' => 'btn btn-danger'])!!}
                        {!! Form::close() !!}
                    @endif
                    </td>
                </tr>
                @endforeach
            </tbody>

        </table>
    </div>


</body></html>
@include('forms.fdatatables_script')
