@extends('template')


@section('nav')
        <!-- nav Bar !-->
<div class="navbar-fixed">
  <ul id="dropdown1" class="dropdown-content" style="top : 20px">
        <li><a href="/auth/logout" class="logout">Logout</a></li>
    </ul>
    <nav>
        <div class="nav-wrapper">
            <a href="/" class="brand-logo">ECOS</a>
            <ul id="nav-mobile" class="right hide-on-med-and-down">
              @if(\Illuminate\Support\Facades\Auth::user()==null)
                <li><a href="/auth/login">Login<i class="material-icons right">more_vert</i></a></li>
              @else
                <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>
              @endif
           </ul> 
        </div>
    </nav>
</div>

@section('contenu')
  <div class="container">
    <div class="section">
      <h3 class="blue-text text-darken-2 center">Sessions</h3>
    <table class="striped centered">
        <thead>
        <tr>
            <th data-field="id">Identifiant</th>
            <th data-field="date">nom</th>
            <th data-field="niveau">niveau</th>
            <th data-field="inscrption"></th>
            <th data-field="view_examen"></th>
        </tr>
        </thead>

        <tbody>
        @foreach ($sessions as $session)
            <tr>
                <td>{{$session->id_Session}}</td>
                <td>{{$session->nom}}</td>
                <td>{{$session->niveau}}</td>
                <td>{{$session->filiere}}</td>
                 <td><a href="/session/{{$session->id_Session}}/inscription" class="waves-effect waves-light btn" >Inscription</a></td>
                 <td><a href="/session/{{$session->id_Session}}/examen/resultat" class="waves-effect waves-light btn blue">Afficher les examens Associés</a></td>
            </tr>

        @endforeach
        </tbody>
    </table>

</div>

</div>


@stop

