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
67 lines
3.4 KiB
HTML
67 lines
3.4 KiB
HTML
{% extends "management/base.html" %}
|
|
{% load i18n lucide static %}
|
|
|
|
{% comment %}
|
|
One section per non-MEMBER role (management.views.ClubRoleListView) -- the
|
|
plain MEMBER role every active club member holds automatically is excluded
|
|
entirely, since listing it here would just be noise. "Grant role" opens a
|
|
modal (controlpanel/_modal_form.html) rather than a separate page -- role_create
|
|
is POST-only, see ClubRoleCreateView.
|
|
{% endcomment %}
|
|
|
|
{% block heading %}{% trans "Roles" %}{% endblock heading %}
|
|
|
|
{% block actions %}
|
|
<button class="btn btn-outline gap-2" type="button" onclick="document.getElementById('grant_role_modal').showModal()">{% lucide "plus" size=16 %} {% trans "Grant role" %}</button>
|
|
{% endblock actions %}
|
|
|
|
{% block panel %}
|
|
<div class="flex flex-col gap-4">
|
|
{% for value, label, description, roles_for_section in sections %}
|
|
{% with role_label=label|capfirst %}
|
|
<div class="card bg-base-100 shadow">
|
|
<div class="card-body">
|
|
<h2 class="card-title text-base">{{ role_label }}</h2>
|
|
{% if description %}<p class="text-sm opacity-70">{{ description }}</p>{% endif %}
|
|
<div class="overflow-x-auto">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Member" %}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for role in roles_for_section %}
|
|
<tr>
|
|
<td>{{ role.member }}</td>
|
|
<td class="text-right">
|
|
<form method="post" action="{% url 'management:role_revoke' role.pk %}">
|
|
{% csrf_token %}
|
|
<button class="btn btn-outline btn-error btn-sm gap-2" type="submit">{% lucide "x" size=14 %} {% trans "Revoke" %}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="2" class="text-center opacity-60">{% blocktrans %}No one has the {{ role_label }} role yet.{% endblocktrans %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endwith %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% trans "Grant role" as grant_role_label %}
|
|
{% url 'management:role_create' as role_create_url %}
|
|
{% include "controlpanel/_modal_form.html" with modal_id="grant_role_modal" title=grant_role_label form=role_form action_url=role_create_url submit_label=grant_role_label submit_icon="shield-check" %}
|
|
{% endblock panel %}
|
|
|
|
{% block extra_body %}
|
|
<script src="{% static 'js/searchable-select.js' %}"></script>
|
|
{% endblock extra_body %}
|