@extends('template')

@section('contenu')
<div class="navbar-fixed">
  <nav>
    <div class="nav-wrapper">
      <div class="col s12">

        <a href="/session/{{$sessionId}}/inscription" class="breadcrumb">Inscription</a>
        <a href="/session/{{$sessionId}}/inscription/{{$etudiantId}}" class="breadcrumb">Choix</a>
        <ul id="nav-mobile" class="right hide-on-med-and-down">
             <li><a href="/">Home</a></li>
           </ul> 
         </div>
    </div>
  </nav>
</div>
    <div id="progress" class="progress" style="display:none">
        <div class="indeterminate"></div>
    </div>
      <div class="container">
    <div class="section">
<table class="striped centered">
    <thead>
       	<tr>
           	<th data-field="id">Identifiant</th>
           	<th data-field="date">date</th>
           	<th data-field="type">Type</th>
            <th data-field="inscrit"></th>
        </tr>
    </thead>

    <tbody>
        <?php $i=0 ?>
       	@foreach ($examens as $examen)
        
      		<tr>
      			<td>{{$examen->id_Examen}}</td>
      			<td>{{$examen->date}}</td>
       			<td>{{$examen->nom}}</td>
            @if($validation[$i][1]=="")
       			  <td><a href="/session/{{$sessionId}}/inscription/{{$etudiantId}}/{{$examen->id_Examen}}/add" class="waves-effect waves-light btn blue {{$validation[$i][0]}}" onclick="show()">inscrire</a></td>
            @else
              <td><p class="red-text text-red accent-2">{{$validation[$i][1]}}</p></td>
            @endif
       		</tr>
          <?php $i++ ?>
       		@endforeach
   </tbody>
</table>
</div>
</div>
      <script type="text/javascript">
        function show() {
            document.getElementById('progress').style.display = 'block';
        }
    </script>
 
@stop