games.blade.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. @extends('layouts.admin')
  2. @section('title')
  3. Risultati
  4. @stop
  5. @section('content')
  6. <div class="row">
  7. <div class="col-xs-12">
  8. <div class="box">
  9. <div class="row">
  10. <div class="col-xs-12">
  11. @php
  12. $capo = false;
  13. @endphp
  14. @foreach($games as $idx => $g)
  15. @php
  16. $color = "red";
  17. foreach($g as $_g)
  18. {
  19. if ($_g->played)
  20. $color = "blue";
  21. }
  22. if ($g[0]->type == 'RITORNO' && !$capo)
  23. {
  24. $capo = true;
  25. print "<br><br><br>";
  26. }
  27. @endphp
  28. <div style="padding:10px;background-color:{{$color}};color:white;margin:5px;float:left;"><a href="#{{$idx}}" style="color:white">{{str_replace('ANDATA', '', str_replace('RITORNO', '', $idx))}}&ordf;</a></div>
  29. @endforeach
  30. </div>
  31. <div class="col-xs-12" style="padding:20px;">
  32. <a href="{{ route('calendars.index') }}" class="btn btn-info">Indietro</a>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="box">
  37. <div class="row">
  38. <div class="col-xs-10">
  39. <h3>Classifica</h3>
  40. </div>
  41. </div>
  42. <div class="box-body table-responsive no-padding">
  43. <table class="table table-striped table-hover">
  44. <tr>
  45. <th>Squadra</th>
  46. <th>Punti</th>
  47. <th>PG</th>
  48. <th>V</th>
  49. <th>N</th>
  50. <th>P</th>
  51. <th>GF</th>
  52. <th>GS</th>
  53. <th>DR</th>
  54. </tr>
  55. @foreach($aRates as $r)
  56. <tr>
  57. <td>{{$r["team"]}}</td>
  58. <td>{{$r["POINTS"]}}</td>
  59. <td>{{$r["PG"]}}</td>
  60. <td>{{$r["V"]}}</td>
  61. <td>{{$r["N"]}}</td>
  62. <td>{{$r["P"]}}</td>
  63. <td>{{$r["GF"]}}</td>
  64. <td>{{$r["GS"]}}</td>
  65. <td>{{$r["DR"]}}</td>
  66. </tr>
  67. @endforeach
  68. </table>
  69. </div>
  70. <br>
  71. @foreach($aRates as $idx => $r)
  72. @if($r["penality"] != '')
  73. <span style="margin-left: 10px">
  74. {{$r["penality"]}}<br>
  75. </span>
  76. @endif
  77. @endforeach
  78. <br>
  79. </div>
  80. <div class="box">
  81. @php
  82. $old = '';
  83. @endphp
  84. @foreach($games as $idx => $g)
  85. @if($old == '' || $old != $g[0]->type)
  86. <div class="col-xs-10"><h1>{{$g[0]->type}}</h1></div>
  87. @endif
  88. <div class="row">
  89. <a name="{{$idx}}"></a>
  90. <div class="col-xs-10">
  91. <h3>&nbsp;&nbsp;&nbsp;{!!str_replace('ANDATA', '&ordf; A', str_replace('RITORNO', '&ordf; R', $idx))!!}</h3>
  92. </div>
  93. <div class="col-xs-2">
  94. <br><a href="/admin/calendars/games/{{$g[0]->calendar_id}}/{{$g[0]->day}}/{{$g[0]->type}}" class="btn btn-info text-right">Modifica</a><br><br>
  95. </div>
  96. </div>
  97. <div class="box-body table-responsive no-padding">
  98. <table class="table table-striped table-hover">
  99. <tr>
  100. <th>Data</th>
  101. <th>In casa</th>
  102. <th>Trasferta</th>
  103. <th>Risultato</th>
  104. </tr>
  105. @foreach($g as $gg)
  106. <tr>
  107. <td>{{date("d/m/Y", strtotime($gg->date))}}</td>
  108. <td>{!!$gg->getHomeTeam()->name!!}</td>
  109. <td>{!!$gg->getAwayTeam()->name!!}</td>
  110. <td>
  111. @if($gg->played)
  112. {{$gg->home_goals}} - {{$gg->away_goals}}
  113. @endif
  114. </td>
  115. </tr>
  116. @endforeach
  117. </table>
  118. </div>
  119. <br>
  120. @php
  121. $old = $g[0]->type;
  122. @endphp
  123. @endforeach
  124. </div>
  125. </div>
  126. <div class="col-xs-2">
  127. <a href="{{ route('calendars.index') }}" class="btn btn-info">Indietro</a>
  128. </div>
  129. </div>
  130. @stop