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.

61 lines
2.3 KiB

  1. @extends('layouts.app')
  2. @push('scripts')
  3. <script src="{{ asset('js/teams.js') }}"></script>
  4. @endpush
  5. @section('content')
  6. <div class="container">
  7. <div class="row">
  8. <div class="col-md-8 col-md-offset-2">
  9. @foreach($teams as $team)
  10. <section class="panel panel-default" data-team="{{ $team->id }}">
  11. <div class="panel-heading">
  12. <div class="team">
  13. <span class="team-icon" style="background-color: #{{ $team->color }};"></span>
  14. <span class="team-name">{{ $team->name }}</span>
  15. </div>
  16. </div>
  17. <div class="panel-body player-list">
  18. <ul>
  19. @foreach($team->players as $player)
  20. <li>
  21. <div class="profile">
  22. <img src="{{ $player->photo }}">
  23. <span><a href="https://twitter.com/{{ $player->twitter }}">{{ '@'.$player->twitter }}</a></span>
  24. </div>
  25. </li>
  26. @endforeach
  27. </ul>
  28. @can('admin')
  29. <form class="form-inline">
  30. <div class="form-group">
  31. <input type="text" class="form-control new-player-twitter" data-team="{{ $team->id }}" placeholder="@twitter">
  32. <button type="submit" class="btn btn-default new-player-twitter-btn">Add</button>
  33. </div>
  34. </form>
  35. @endcan
  36. </div>
  37. </section>
  38. @endforeach
  39. @can('admin')
  40. <button id="add-team" class="btn btn-default">New Team</button>
  41. <br><br>
  42. <form class="form-inline">
  43. <div class="form-group">
  44. <input type="text" class="form-control new-player-twitter" data-team="0" placeholder="@twitter">
  45. <button type="submit" class="btn btn-default new-player-twitter-btn">Remove</button>
  46. </div>
  47. </form>
  48. @endcan
  49. </div>
  50. </div>
  51. </div>
  52. @endsection