{% extends 'base.html' %} {% load static %} {% block content %}
 <!--end::Sidebar-->
      <!--begin::App Main-->
      <main class="app-main">
        <!--begin::App Content Header-->
        <div class="app-content-header">
          <!--begin::Container-->
          <div class="container-fluid">
            <!--begin::Row-->
            <div class="row">
              <div class="col-sm-6"><h3 class="mb-0">{{msg}}</h3></div>
              <div class="col-sm-6">
                <ol class="breadcrumb float-sm-end">
                  <li class="breadcrumb-item"><a href="#">Home</a></li>
                  <li class="breadcrumb-item active" aria-current="page">Players</li>
                </ol>
              </div>
            </div>
            <!--end::Row-->
          </div>
          <!--end::Container-->
        </div>
        <!--end::App Content Header-->
        <!--begin::App Content-->
        <div class="app-content">
          <!--begin::Container-->
          <div class="container-fluid">
              <div class="row">
                {% if players %}
                  {% for player in players %}
                  {% comment %} <div class="col-md-3">
                      <div class="card">
                          <img class="card-img-top" src="{{player.passport_photo.url}}" alt="Card image cap">
                          <div class="card-body">
                            <h5 class="card-title">Status: {{player.status}}</h5>
                          </div>
                          <ul class="list-group list-group-flush">
                            <li class="list-group-item">Name: {{player.surname}} {{player.other_names}}</li>
                            
                          </ul>
                          <div class="card-footer">
                            <div class="d-grid gap-2">
                                <a href="" class="btn btn-primary btn-lg">View</a>
                            </div>
                            
                          </div>
                        </div>
                  </div> {% endcomment %}


                  <div class="col-md-3">
                      <div class="card">
                          <img class="card-img-top" src="{{player.passport_photo.url}}" alt="Card image cap" height="200">
                          <div class="card-body">
                            <h5 class="card-title">Club Status: {{player.status}}</h5>
                          </div>
                          <ul class="list-group list-group-flush">
                            <li class="list-group-item">Name: {{player.surname}} {{player.other_names}}</li>
                            <li class="list-group-item">NO: {{player.jersey_number}}</li>
                            <li class="list-group-item">Club: {{player.club.club_name}}</li>
                            
                          </ul>
                          <div class="card-footer">
                            <div class="d-grid gap-2">
                                <a href="{% url "player_details" player.club.id player.id%}" class="btn btn-warning btn-lg">View Details</a>
                            </div>
                            
                          </div>
                        </div>
                  </div>


                  {% endfor %} 
                  
                  {% else %}
                    <p class="card px-5 py-3 text-center">No Club Players Yet.</p>
                  {% endif %}
                
                  
            <!--end::Row-->
          </div>
          <!--end::Container-->
        </div>
        <!--end::App Content-->
      </main>
      <!--end::App Main-->
      <!--begin::Footer-->

{% endblock content %}
