You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.8 KiB

  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="container">
  4. <div class="row">
  5. <div class="col-md-12">
  6. <table class="table table-bordered">
  7. <thead>
  8. <tr>
  9. <th>Team</th>
  10. @foreach($missions as $mission)
  11. <th>
  12. <h3>{{ $mission->id }}</h3>
  13. {{ $mission->hashtag }}
  14. </th>
  15. @endforeach
  16. <th>Score</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. @foreach($teams as $team)
  21. <tr>
  22. <td>
  23. <div class="team">
  24. <span class="team-icon" style="background-color: #{{ $team->color }};"></span>
  25. <span class="team-name">{{ $team->name }}</span>
  26. </div>
  27. <div class="players">
  28. @foreach($team->players as $player)
  29. <a href="https://twitter.com/{{ $player->twitter }}">{{ '@'.$player->twitter }}</a>
  30. @endforeach
  31. </div>
  32. </td>
  33. @foreach($missions as $mission)
  34. <td>
  35. @if(Auth::guest())
  36. <div>{{ $mission->complete($team) ? 'Complete' : '' }}</div>
  37. @else
  38. <div>{{ $mission->score($team) }}</div>
  39. <div>{{ $mission->complete($team) ? 'Complete' : '' }}</div>
  40. <div>{{ $mission->progress($team)[0].'/'.$mission->progress($team)[1] }}</div>
  41. @endif
  42. </td>
  43. @endforeach
  44. <td>
  45. <b>{{ $team->total_score() }}</b>
  46. </td>
  47. </tr>
  48. @endforeach
  49. </tbody>
  50. </table>
  51. </div>
  52. </div>
  53. </div>
  54. @endsection