games_edit.blade.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @extends('layouts.admin')
  2. @section('title')
  3. Partite giornata {{$day}} {{$type}}
  4. @stop
  5. @section('content')
  6. <form action="/admin/calendars/games/{{$id}}/{{$day}}/{{$type}}" method="POST">
  7. {{csrf_field()}}
  8. <div class="row">
  9. <div class="col-xs-12">
  10. <div class="box">
  11. <div class="box-body table-responsive no-padding">
  12. <table class="table table-striped table-hover">
  13. <tr>
  14. <th>Data</th>
  15. <th>In casa</th>
  16. <th>Trasferta</th>
  17. <th>Risultato</th>
  18. </tr>
  19. @foreach($games as $gg)
  20. <tr>
  21. <td>
  22. <input name="date_{{$gg->id}}" value="{{date("d/m/Y", strtotime($gg->date))}}" class="form-control" style="width:100px;display:inline;">
  23. </td>
  24. <td>{!!$gg->getHomeTeam()->name!!}</td>
  25. <td>{!!$gg->getAwayTeam()->name!!}</td>
  26. <td>
  27. @if($gg->home_team_id != NULL && $gg->away_team_id != NULL)
  28. <input name="home_goals_{{$gg->id}}" type="text" class="form-control" value="{{$gg->home_goals}}" style="width:40px;display:inline;">&nbsp;-&nbsp;<input name="away_goals_{{$gg->id}}" type="text" class="form-control" style="width:40px;display:inline;" value="{{$gg->away_goals}}">
  29. @if($gg->played)
  30. <input style="margin-left:30px" type="checkbox" name="delete_{{$gg->id}}"> Elimina
  31. @endif
  32. @endif
  33. </td>
  34. </tr>
  35. @endforeach
  36. </table>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="col-xs-6">
  41. <button type="submit" class="btn btn-success">Salva</button>
  42. <a href="{{ route('calendars.games', array($id)) }}" class="btn btn-info">Indietro</a>
  43. </div>
  44. </div>
  45. </form>
  46. @stop