@extends('layouts.admin')

@section('title')

  Stagioni

@stop

@section('content')

	   <div class="row">
        <div class="col-xs-12">
          <div class="box">

            <div class="box-body table-responsive no-padding">
              <table class="table table-striped table-hover">
                <tr>
                  <th>Nome</th>
                  <th>Stagione corrente</th>
                  <th width="50"></th>
                  <th width="50"></th>
                </tr>
                @foreach($seasons as $season)
                	<tr>
                    <td>{{$season->name}}</td>
                    <td>{{$season->default ? 'X' : ''}}</td>
                    <td>
                        <a href="{{ route('seasons.edit', array($season->id)) }}" type="button" class="btn btn-w-m btn-primary">Modifica</a>
                    </td>
                    <td>
                      {!! Form::open(array('class' => 'form-inline', 'method' => 'DELETE', 'route' => array('seasons.destroy', $season->id))) !!}
                          <button type="submit" class="btn btn-w-m btn-danger" onclick="return confirm('Sei sicuro?')">Elimina</button>
                      {!! Form::close() !!}
                    </td>
                	</tr>
                @endforeach
              </table>
            </div>

          </div>

        </div>
        <div class="col-xs-2">
          <a href="{{ route('seasons.create') }}" class="btn btn-success">Aggiungi</a>
        </div>
        
      </div>
@stop
