| 1 |
{%- import "partials/_ui.html" as ui -%} |
| 2 |
{% if entries.is_empty() %} |
| 3 |
{% call ui::empty_state("", "No entries found.") %} |
| 4 |
{% else %} |
| 5 |
<div class="scroll-x"> |
| 6 |
<table class="compact-table minw-700" aria-label="Waitlist entries"> |
| 7 |
<thead> |
| 8 |
<tr> |
| 9 |
<th>User</th> |
| 10 |
<th>Email</th> |
| 11 |
<th>Verified</th> |
| 12 |
<th>Pitch</th> |
| 13 |
<th>Date</th> |
| 14 |
<th>Status</th> |
| 15 |
<th>Actions</th> |
| 16 |
</tr> |
| 17 |
</thead> |
| 18 |
<tbody> |
| 19 |
{% for entry in entries %} |
| 20 |
<tr> |
| 21 |
<td>{{ entry.username }}</td> |
| 22 |
<td class="text-sm">{{ entry.email }}</td> |
| 23 |
<td>{% if entry.email_verified %}Yes{% else %}No{% endif %}</td> |
| 24 |
<td class="admin-entries-pitch"> |
| 25 |
{% if let Some(pitch_text) = entry.pitch %} |
| 26 |
{{ pitch_text }} |
| 27 |
{% else %} |
| 28 |
<span class="admin-entries-pitch-empty">No pitch (invited)</span> |
| 29 |
{% endif %} |
| 30 |
{% if let Some(inviter) = entry.invited_by_username %} |
| 31 |
<div class="text-xs dimmed admin-entries-pitch-inviter">Invited by @{{ inviter }}</div> |
| 32 |
{% endif %} |
| 33 |
</td> |
| 34 |
<td class="text-sm nowrap">{{ entry.created_at }}</td> |
| 35 |
<td> |
| 36 |
<span class="badge {{ entry.status }}">{{ entry.status }}</span> |
| 37 |
{% if let Some(method) = entry.selection_method %} |
| 38 |
<span class="text-xs dimmed">({{ method }})</span> |
| 39 |
{% endif %} |
| 40 |
</td> |
| 41 |
<td class="nowrap"> |
| 42 |
{% if entry.status == "pending" %} |
| 43 |
<button class="btn-primary small" |
| 44 |
hx-post="/api/admin/waitlist/{{ entry.id }}/approve" |
| 45 |
hx-target="#entries-table" |
| 46 |
hx-swap="innerHTML" |
| 47 |
hx-confirm="Approve this creator?">Approve</button> |
| 48 |
<button class="btn-danger small" |
| 49 |
hx-post="/api/admin/waitlist/{{ entry.id }}/spam" |
| 50 |
hx-target="#entries-table" |
| 51 |
hx-swap="innerHTML">Spam</button> |
| 52 |
{% endif %} |
| 53 |
</td> |
| 54 |
</tr> |
| 55 |
{% endfor %} |
| 56 |
</tbody> |
| 57 |
</table> |
| 58 |
</div> |
| 59 |
{% endif %} |
| 60 |
|