Diff -- /var/www/vhosts/3dshawn.com/crm.3dshawn.com/TEMPLATES/cf_admin_users.html

O Operator
Diff

/var/www/vhosts/3dshawn.com/crm.3dshawn.com/TEMPLATES/cf_admin_users.html

added on local at 2026-07-11 18:32:00

Added
+0
lines
Removed
-0
lines
Context
52
unchanged
Blobs
from 9205ea4f6537
to 9205ea4f6537
Restore this content →
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.
11<div class="page-header">
22 <div><h1>All Users</h1><p class="subtitle">Click a row to view details, or impersonate any user across the platform.</p></div>
33</div>
44<div class="card mb-2">
55 <form method="GET" action="/admin_users.cgi" style="display:flex;gap:8px">
66 <input class="input" name="q" value="$q" placeholder="Email, name, or display name...">
77 <button type="submit" class="btn btn-primary">Search</button>
88 </form>
99</div>
1010<style>
1111 tr.au-clickable { cursor: pointer; transition: background 0.12s; }
1212 tr.au-clickable:hover { background: rgba(255,255,255,0.04); }
1313 .au-av { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0; }
1414 .au-imp-btn { background: #fbbf24; color: #1a1303; border: 1px solid #fbbf24; padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 12px; cursor: pointer; }
1515 .au-imp-btn:hover { background: #f59e0b; border-color: #f59e0b; }
1616</style>
1717<div class="card">
1818[if:$has_users]
1919<table class="table">
2020 <thead><tr><th>Member</th><th>Email</th><th>Plan</th><th>Status</th><th>Last login</th><th></th></tr></thead>
2121 <tbody>
2222 [loop:@users]
2323 <tr class="au-clickable" data-href="/admin_user.cgi?u=$loop1.id">
2424 <td><div style="display:flex;align-items:center;gap:10px"><div class="au-av" style="background:$loop1.avatar_color">$loop1.initials</div><div>$loop1.display_name [if:$loop1.is_admin_flag]<span class="badge danger">ADMIN</span>[/if]</div></div></td>
2525 <td>$loop1.email</td>
2626 <td><span class="badge">$loop1.plan_tier</span></td>
2727 <td><span class="badge">$loop1.account_status</span></td>
2828 <td style="font-size:12px;color:var(--col-text-dim)"><span class="ts" data-ts="$loop1.last_login_epoch" data-fmt="relative">$loop1.last_login_at</span></td>
2929 <td>
3030 [if:!$loop1.is_self]
3131 <form method="POST" action="/admin_action.cgi" style="display:inline;margin:0" onclick="event.stopPropagation()">
3232 <input type="hidden" name="act" value="impersonate">
3333 <input type="hidden" name="u" value="$loop1.id">
3434 <button type="submit" class="au-imp-btn">Impersonate</button>
3535 </form>
3636 [/if]
3737 </td>
3838 </tr>
3939 [/loop]
4040 </tbody>
4141</table>
4242<script>
4343 document.querySelectorAll('tr.au-clickable').forEach(function(tr){
4444 tr.addEventListener('click', function(e){
4545 if (e.target.closest('a,button,form,input')) return;
4646 window.location.href = tr.dataset.href;
4747 });
4848 });
4949</script>
5050[/if]
5151[if:!$has_users]<div class="muted-empty"><h3>No users found</h3></div>[/if]
5252</div>