diff --git a/controlpanel/templates/controlpanel/_club_health_table.html b/controlpanel/templates/controlpanel/_club_health_table.html new file mode 100644 index 0000000..b8795bd --- /dev/null +++ b/controlpanel/templates/controlpanel/_club_health_table.html @@ -0,0 +1,62 @@ +{% load lucide %} + +{% comment %} + The club table, shared by the dashboard and the clubs list so the two cannot drift apart. + Health, not vanity: a member total says nothing you can act on, while "no coach", + "nothing scheduled", "€ owed" and "no admins" each name something somebody has to go and + fix. Every column is annotated by clubs_with_health() in a single query. + + Expects: clubs (from clubs_with_health), and optionally empty_message. +{% endcomment %} +
| Club | +Members | +Unpaid | +Owed | +Teams | +Upcoming | +Admins | +
|---|---|---|---|---|---|---|
|
+ {{ club.name }}
+
+ {{ club.slug }}
+ {% if club.is_archived %}
+ {% comment %}
+ An archived club's subdomain does not resolve, so "dormant" and
+ "no season" would be noise: of course nothing is scheduled.
+ {% endcomment %}
+ {% lucide "archive" size=10 %} Archived
+ {% else %}
+ {% if not club.has_season %}{% lucide "calendar-x" size=10 %} No season{% endif %}
+ {% if not club.upcoming_events %}{% lucide "moon-star" size=10 %} Dormant{% endif %}
+ {% endif %}
+
+ |
+ {{ club.active_members }} | +{{ club.unpaid_members }} | +€{{ club.outstanding|floatformat:2 }} | ++ {{ club.team_count }} + {% if club.teams_without_coach %} + {{ club.teams_without_coach }} no coach + {% endif %} + | +{{ club.upcoming_events }} | +{{ club.admin_count }} | +
| {{ empty_message|default:"No clubs yet." }} | +||||||