37 lines
1.4 KiB
HTML
37 lines
1.4 KiB
HTML
{% extends "base.html" %}
|
|
{% load l10n %}
|
|
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h2>Dashboard</h2>
|
|
<div>
|
|
{% if user.coached_teams.all or user.assisted_teams.all %}
|
|
<a href="{% url 'select-event-type' %}" class="btn btn-primary">Create New Event</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Your Team's Events</h3>
|
|
{% if events %}
|
|
<div class="list-group">
|
|
{% for event in events %}
|
|
<div class="list-group-item list-group-item-action flex-column align-items-start">
|
|
<div class="d-flex w-100 justify-content-between">
|
|
<h5 class="mb-1">{{ event.title }}</h5>
|
|
<small>{{ event.start_time|localize }}</small>
|
|
</div>
|
|
<p class="mb-1">{{ event.description }}</p>
|
|
<small>Location: {{ event.location_address }}</small>
|
|
<a href="{{ event.maps_shortlink }}" target="_blank" class="btn btn-secondary btn-sm">View on Map</a>
|
|
{% if user == event.team.head_coach or user in event.team.assistant_coaches.all %}
|
|
<a href="{% url 'event-update' event.pk %}" class="btn btn-warning btn-sm">Edit</a>
|
|
<a href="{% url 'event-delete' event.pk %}" class="btn btn-danger btn-sm">Delete</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p>No events found for your team.</p>
|
|
{% endif %}
|
|
{% endblock %}
|