Skip to main content

max / multithreaded

4.6 KB · 120 lines History Blame Raw
1 {% extends "base.html" %}
2
3 {% block title %}Admin — Multithreaded{% endblock %}
4
5 {% block head %}<meta name="robots" content="noindex">{% endblock %}
6
7 {% block header %}{% include "partials/site_header.html" %}{% endblock %}
8
9 {% block content %}
10 <div class="container">
11 <div class="breadcrumb">
12 <a href="/">Forums</a>
13 <span class="sep">/</span>
14 Admin
15 </div>
16 <div class="page-header">
17 <h1>Platform Admin</h1>
18 </div>
19
20 <div class="settings-section">
21 <h3>User Search</h3>
22 <form method="get" action="/_admin" class="form-container search-form">
23 <div class="form-group flex-1">
24 <label for="user-search">Username</label>
25 <input type="text" id="user-search" name="q" value="{{ search_query }}" placeholder="Search users...">
26 </div>
27 <button type="submit" class="primary">Search</button>
28 </form>
29 </div>
30
31 {% if !users.is_empty() %}
32 <div class="settings-section">
33 <h3>Users</h3>
34 <table class="settings-table">
35 <thead>
36 <tr>
37 <th>Username</th>
38 <th>Display Name</th>
39 <th>Status</th>
40 <th>Actions</th>
41 </tr>
42 </thead>
43 <tbody>
44 {% for user in users %}
45 <tr>
46 <td class="settings-mono">{{ user.username }}</td>
47 <td>{{ user.display_name.as_deref().unwrap_or("-") }}</td>
48 <td>
49 {% if user.is_suspended %}
50 <span class="badge badge-ban">suspended</span>
51 {% else %}
52 <span class="badge badge-role-member">active</span>
53 {% endif %}
54 </td>
55 <td class="settings-actions">
56 {% if user.is_suspended %}
57 <form method="post" action="/_admin/users/{{ user.id }}/unsuspend" class="form-inline">
58 <button type="submit" class="post-action-link">unsuspend</button>
59 </form>
60 {% else %}
61 <form method="post" action="/_admin/users/{{ user.id }}/suspend" class="form-inline-row">
62 <input type="text" name="reason" placeholder="Reason" class="input-compact">
63 <button type="submit" class="post-action-link post-action-delete">suspend</button>
64 </form>
65 {% endif %}
66 </td>
67 </tr>
68 {% endfor %}
69 </tbody>
70 </table>
71 </div>
72 {% endif %}
73
74 <div class="settings-section">
75 <h3>Communities</h3>
76 {% if communities.is_empty() %}
77 <div class="empty-state">No communities.</div>
78 {% else %}
79 <table class="settings-table">
80 <thead>
81 <tr>
82 <th>Name</th>
83 <th>Slug</th>
84 <th>Status</th>
85 <th>Actions</th>
86 </tr>
87 </thead>
88 <tbody>
89 {% for c in communities %}
90 <tr>
91 <td>{{ c.name }}</td>
92 <td class="settings-mono">{{ c.slug }}</td>
93 <td>
94 {% if c.is_suspended %}
95 <span class="badge badge-ban">suspended</span>
96 {% else %}
97 <span class="badge badge-role-member">active</span>
98 {% endif %}
99 </td>
100 <td class="settings-actions">
101 {% if c.is_suspended %}
102 <form method="post" action="/_admin/communities/{{ c.id }}/unsuspend" class="form-inline">
103 <button type="submit" class="post-action-link">unsuspend</button>
104 </form>
105 {% else %}
106 <form method="post" action="/_admin/communities/{{ c.id }}/suspend" class="form-inline-row">
107 <input type="text" name="reason" placeholder="Reason" class="input-compact">
108 <button type="submit" class="post-action-link post-action-delete">suspend</button>
109 </form>
110 {% endif %}
111 </td>
112 </tr>
113 {% endfor %}
114 </tbody>
115 </table>
116 {% endif %}
117 </div>
118 </div>
119 {% endblock %}
120