internal statistics & tooling

This commit is contained in:
SowinskiBraeden committed 2026-06-28 12:11:22 -07:00
1 parent 79c638b8fa
commit 51c8656a69
12 files changed
+2065 -2

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
{% extends "base.html" %}
{% block title %}Leagues · Admin · myboker.org{% endblock %}
{% block sidebar %}{% include "_internal_sidebar.html" %}{% endblock %}
{% block page_class %}page--app{% endblock %}
{% block content %}
<div class="db-header int-page-header">
<div>
<h1 class="db-header__title">Leagues</h1>
<p class="db-header__sub">Search by league name, slug, or owner email.</p>
</div>
</div>
<div class="admin-list-tools">
<form class="admin-searchbar" method="get" action="{{ url_for('internal.leagues') }}">
<input class="field-input" type="search" name="q" value="{{ q }}" placeholder="Search league or owner">
<button class="btn btn--primary btn--sm" type="submit">Search</button>
{% if q %}<a class="btn btn--ghost btn--sm" href="{{ url_for('internal.leagues') }}">Clear</a>{% endif %}
</form>
</div>
<section class="panel admin-list-panel">
<div class="panel__head">
<h2 class="panel__title">Matching leagues</h2>
<span class="panel__tag">{{ pagination.start }}-{{ pagination.end }} of {{ pagination.total }}</span>
</div>
<div class="table-wrap">
<table class="tbl admin-table">
<thead>
<tr>
<th>League</th>
<th>Owner</th>
<th>Visibility</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
{% for league in leagues %}
{% set owner = owners.get(league.id) %}
<tr>
<td class="admin-table__primary"><a href="{{ url_for('internal.league_detail', league_id=league.id) }}">{{ league.name }}</a></td>
<td>{% if owner %}<a href="{{ url_for('internal.user_detail', user_id=owner.id) }}">{{ owner.email }}</a>{% else %}<span class="muted-text">Missing</span>{% endif %}</td>
<td><span class="badge">{{ league.visibility }}</span></td>
<td>{% if league.archived_at %}<span class="badge badge--closed">Archived</span>{% else %}<span class="badge badge--open">Active</span>{% endif %}</td>
<td class="tbl__actions"><a class="btn btn--ghost btn--sm" href="{{ url_for('internal.league_detail', league_id=league.id) }}">View</a></td>
</tr>
{% else %}
<tr><td colspan="5" class="muted-text">No leagues found.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% if pagination.pages > 1 %}
<div class="pagination-row">
{% if pagination.has_prev %}
<a class="btn btn--ghost btn--sm" href="{{ url_for('internal.leagues', q=q, page=pagination.prev_page) }}">Previous</a>
{% else %}
<span class="btn btn--ghost btn--sm is-disabled">Previous</span>
{% endif %}
<span class="pagination-row__label">Page {{ pagination.page }} of {{ pagination.pages }}</span>
{% if pagination.has_next %}
<a class="btn btn--ghost btn--sm" href="{{ url_for('internal.leagues', q=q, page=pagination.next_page) }}">Next</a>
{% else %}
<span class="btn btn--ghost btn--sm is-disabled">Next</span>
{% endif %}
</div>
{% endif %}
</section>
{% endblock %}