A large batch of club-management features built up over one session: - Club dashboard banner warning admins 1 month before billing ends - Full Events/EventSeries CRUD (recurrence builder, occurrence lifecycle, per-team permissions), with match->game rename and game-specific fields (score, competition, live status, external game ID) - Django-admin competition dropdown, gated per-club by feature flag - Auto-import of RBIHF fixtures (scrape -> diff -> preview -> confirm), with location/opponent dropdowns suggested from existing club data - Feature-flag-gated Shop/Forms nav sections, reusing the same flag machinery for the RBIHF import button - Team roster now scoped to members active this season or next, sorted and grouped by position - Club sport type (ice hockey / other), shown in the control panel's club subtitle - Per-season team photo upload from the team page - New public read-only API (Django Ninja) at /api/v1/: news, team rosters, upcoming/live/per-team games, and sponsors -- auto-documented via Swagger UI, CORS-enabled for a club's own external website - Club sponsors: admin-only CRUD (logo, URL, active date window) plus a date-windowed, optionally randomized API endpoint - Assorted fixes: NullBooleanField dropdown rendering, cross-club event validation timing, searchable-select chip placement, btn-neutral -> default button style sweep, calendar-month chart windows Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R1gj3J1QPfP38XWpnpbFpy
69 lines
3.6 KiB
HTML
69 lines
3.6 KiB
HTML
{% extends "management/base.html" %}
|
|
{% load i18n lucide ui %}
|
|
|
|
{% block heading %}{% trans "Sponsors" %}{% endblock heading %}
|
|
|
|
{% block actions %}
|
|
<a class="btn btn-primary gap-2" href="{% url 'management:sponsor_create' %}">{% lucide "plus" size=16 %} {% trans "New sponsor" %}</a>
|
|
{% endblock actions %}
|
|
|
|
{% block panel %}
|
|
<div class="card bg-base-100 shadow">
|
|
<div class="card-body">
|
|
<div class="overflow-x-auto">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>{% trans "Name" %}</th>
|
|
<th>{% trans "URL" %}</th>
|
|
<th>{% trans "Start date" %}</th>
|
|
<th>{% trans "End date" %}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for sponsor in sponsors %}
|
|
<tr>
|
|
<td>
|
|
{% if sponsor.logo %}
|
|
<img src="{{ sponsor.logo.url }}" alt="" class="size-8 rounded object-contain">
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ sponsor.name }}</td>
|
|
<td>
|
|
{% if sponsor.url %}
|
|
<a class="link link-hover" href="{{ sponsor.url }}" target="_blank" rel="noopener noreferrer">{{ sponsor.url }}</a>
|
|
{% else %}
|
|
<span class="opacity-50">—</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ sponsor.start_date|date:"Y-m-d" }}</td>
|
|
<td>{{ sponsor.end_date|date:"Y-m-d"|default:"—" }}</td>
|
|
<td class="text-right">
|
|
<div class="flex justify-end gap-1">
|
|
<a class="btn btn-outline btn-sm" href="{% url 'management:sponsor_update' sponsor.pk %}" aria-label="{% trans 'Edit' %}">{% lucide "pencil" size=14 %} {% trans "Edit" %}</a>
|
|
<button class="btn btn-sm btn-outline btn-error" type="button" onclick="document.getElementById('{{ sponsor.pk|dom_id:"sponsor_delete_modal" }}').showModal()" aria-label="{% trans 'Delete' %}">{% lucide "trash-2" size=14 %} {% trans "Delete" %}</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="6" class="text-center opacity-60">{% trans "No sponsors yet." %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% trans "Delete sponsor" as delete_sponsor_title %}
|
|
{% trans "Delete" as delete_label %}
|
|
{% for sponsor in sponsors %}
|
|
{% url 'management:sponsor_delete' sponsor.pk as sponsor_delete_url %}
|
|
{% blocktrans with name=sponsor.name asvar delete_sponsor_body %}Delete “{{ name }}”? This cannot be undone.{% endblocktrans %}
|
|
{% include "controlpanel/_confirm_modal.html" with modal_id=sponsor.pk|dom_id:"sponsor_delete_modal" title=delete_sponsor_title body=delete_sponsor_body action_url=sponsor_delete_url submit_label=delete_label %}
|
|
{% endfor %}
|
|
{% endblock panel %}
|