@extends('template')

@section('nav')
        <!-- nav Bar !-->
<ul id="dropdown1" class="dropdown-content" style="top : 20px">
    <li><a href="/auth/logout" class="logout">Logout</a></li>
</ul>
<div class="navbar-fixed">
    <nav>
        <div class="nav-wrapper">
            <a href="#" class="brand-logo center">Validation des etudiants</a>
            <ul class="right hide-on-med-and-down">
                <li><a class="dropdown-button" href="#!"
                       data-activates="dropdown1">{{ \Illuminate\Support\Facades\Auth::user()->login  }}<i
                                class="material-icons right">more_vert</i></a></li>
            </ul>
        </div>
    </nav>
</div>
<!-- nav Bar !-->
@endsection

@section('contenu')

    <div id="progress" class="progress" style="display:none">
        <div class="indeterminate"></div>
    </div>
      <div class="container">
    <div class="section">
    <form action="valide" method="post">

        {!! csrf_field() !!}

                <!-- Liste des Etudiant !-->
        <div>
            <h4 class="light-blue-text text-darken-1 center">Liste des Etudiants</h4>
             
            <table class="highlight">
                <thead>
                <tr>
                    <th data-field="cin">CIN</th>
                    <th data-field="nom">Nom</th>
                    <th data-field="prenom">Prenom</th>
                    <th>Valider</th>
                    <th>Non Validé</th>
                </tr>
                </thead>
                <tbody>
                    <?php $i=0 ?>
                @foreach ($etudiants as $etudiant)
                    <tr>
                        <td>{!! $etudiant->CIN !!}</td>
                        <td>{!! $etudiant->nom !!}</td>
                        <td>{!! $etudiant->prenom !!}</td>
                        <td>
                            <?php $var = $etudiant->id_Etudiant ?>
                            <input type="radio" value="1" name={!! $var !!} id={!! $var !!} />
                            <label for={!! $var !!} >Check</label>
                        </td>
                         <td>
                            <?php $var = $etudiant->id_Etudiant ?>
                            <input type="radio" value="0" name={!! $var !!} id={!! $var."N" !!} {!! $checked[$i] !!} />
                            <label for={!! $var."N" !!} >Check</label>
                        </td>
                    </tr>
                    <?php $i++ ?>
                @endforeach
                </tbody>
            </table>
            <br>
        </div>
        <div class="row center">
            <input type="submit" class="waves-effect waves-light btn" onclick="show()"/>
        </div>
    </form>
</div>
</div>
    <!-- Liste des Etudiant !-->


    <script type="text/javascript">
        $(document).ready(function () {
            $('.scrollspy').scrollSpy();
        });
        $('.datepicker').pickadate({
            selectMonths: true, // Creates a dropdown to control month
            selectYears: 15 // Creates a dropdown of 15 years to control year
        });
        $(document).ready(function () {
            $('.tooltipped').tooltip({delay: 50});
        });
        $(document).ready(function () {
            $('select').material_select();
        });


    </script>
    <script type="text/javascript">
        function show() {
            document.getElementById('progress').style.display = 'block';
            //alert("hhh");
        }
    </script>

@stop

