Diff -- /var/www/vhosts/3dshawn.com/crm.3dshawn.com/TEMPLATES/cf_admin_users.html
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
to 9205ea4f6537
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.| 1 | 1 | <div class="page-header"> |
| 2 | 2 | <div><h1>All Users</h1><p class="subtitle">Click a row to view details, or impersonate any user across the platform.</p></div> |
| 3 | 3 | </div> |
| 4 | 4 | <div class="card mb-2"> |
| 5 | 5 | <form method="GET" action="/admin_users.cgi" style="display:flex;gap:8px"> |
| 6 | 6 | <input class="input" name="q" value="$q" placeholder="Email, name, or display name..."> |
| 7 | 7 | <button type="submit" class="btn btn-primary">Search</button> |
| 8 | 8 | </form> |
| 9 | 9 | </div> |
| 10 | 10 | <style> |
| 11 | 11 | tr.au-clickable { cursor: pointer; transition: background 0.12s; } |
| 12 | 12 | tr.au-clickable:hover { background: rgba(255,255,255,0.04); } |
| 13 | 13 | .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; } |
| 14 | 14 | .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; } |
| 15 | 15 | .au-imp-btn:hover { background: #f59e0b; border-color: #f59e0b; } |
| 16 | 16 | </style> |
| 17 | 17 | <div class="card"> |
| 18 | 18 | [if:$has_users] |
| 19 | 19 | <table class="table"> |
| 20 | 20 | <thead><tr><th>Member</th><th>Email</th><th>Plan</th><th>Status</th><th>Last login</th><th></th></tr></thead> |
| 21 | 21 | <tbody> |
| 22 | 22 | [loop:@users] |
| 23 | 23 | <tr class="au-clickable" data-href="/admin_user.cgi?u=$loop1.id"> |
| 24 | 24 | <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> |
| 25 | 25 | <td>$loop1.email</td> |
| 26 | 26 | <td><span class="badge">$loop1.plan_tier</span></td> |
| 27 | 27 | <td><span class="badge">$loop1.account_status</span></td> |
| 28 | 28 | <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> |
| 29 | 29 | <td> |
| 30 | 30 | [if:!$loop1.is_self] |
| 31 | 31 | <form method="POST" action="/admin_action.cgi" style="display:inline;margin:0" onclick="event.stopPropagation()"> |
| 32 | 32 | <input type="hidden" name="act" value="impersonate"> |
| 33 | 33 | <input type="hidden" name="u" value="$loop1.id"> |
| 34 | 34 | <button type="submit" class="au-imp-btn">Impersonate</button> |
| 35 | 35 | </form> |
| 36 | 36 | [/if] |
| 37 | 37 | </td> |
| 38 | 38 | </tr> |
| 39 | 39 | [/loop] |
| 40 | 40 | </tbody> |
| 41 | 41 | </table> |
| 42 | 42 | <script> |
| 43 | 43 | document.querySelectorAll('tr.au-clickable').forEach(function(tr){ |
| 44 | 44 | tr.addEventListener('click', function(e){ |
| 45 | 45 | if (e.target.closest('a,button,form,input')) return; |
| 46 | 46 | window.location.href = tr.dataset.href; |
| 47 | 47 | }); |
| 48 | 48 | }); |
| 49 | 49 | </script> |
| 50 | 50 | [/if] |
| 51 | 51 | [if:!$has_users]<div class="muted-empty"><h3>No users found</h3></div>[/if] |
| 52 | 52 | </div> |