{% extends "base.html" %}{% load static %}
{% block title %} {{ title }}{% endblock %}

{% block pre_container %}{% include "page-heading.html" with title="Schedule" %}{% endblock pre_container %}
{% block content %}
    {% load tz %}
    <div class="">
        <div class="card">
            <div class="card-body p-0">
                <div class="table-responsive">
                    <table class="table table-striped table-sm">
                        {#    <thead>#}
                        {#    </thead>#}
                        <tbody>
                        {% for event in events %}
                            <tr class="small">
                                <th>
                                    {{ event.data.formatted_title }}
                                </th>
                                <td class="">
                                    {{ event.data.start_date|localtime|date:"D"}}
                                </td>
                                <td>
                                    {{ event.data.start_date|localtime|date:"M j"}}
                                </td>
                                <td class="d-none d-md-table-cell">
                                    {{ event.data.start_date|localtime|date:"Y"}}
                                </td>
                                <td>
                                    {{ event.data.start_date|localtime|date:"g:i A"}}
                                </td>
                                <td class="small">
                                    {{ event.data.location_name }}
                                </td>
                                <td>
                                    <a class="btn btn-outline-secondary btn-sm" href="{% url 'teamsnap_view_event' team_id=event.data.team_id event_id=event.data.id %}"><i class="bi bi-three-dots"></i></a>
                                </td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
