Diff -- /var/www/vhosts/3dshawn.com/ptmatrix.3dshawn.com/TEMPLATES/tf_admin_users.html
Diff
/var/www/vhosts/3dshawn.com/ptmatrix.3dshawn.com/TEMPLATES/tf_admin_users.html
added on local at 2026-07-11 18:33:10
Added
+55
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to acdd9cfc4333
to acdd9cfc4333
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.| 1 | <div class="page-header"> | |
| 2 | <div> | |
| 3 | <h1>All Users</h1> | |
| 4 | <p class="subtitle">Click a row to view details, or impersonate any user across the platform.</p> | |
| 5 | [if:$has_filter]<p style="margin-top:6px;font-size:12.5px"><span class="badge accent" style="background:rgba(90,169,255,.15);border:1px solid rgba(90,169,255,.4);color:#cee3ff;padding:3px 9px;border-radius:999px">Filtered: $filter_label</span> <a href="/admin_users.cgi" style="margin-left:8px;font-size:12px;color:var(--col-text-muted)">Clear ×</a></p>[/if] | |
| 6 | </div> | |
| 7 | </div> | |
| 8 | <div class="card mb-2"> | |
| 9 | <form method="GET" action="/admin_users.cgi" style="display:flex;gap:8px"> | |
| 10 | <input class="input" name="q" value="$q" placeholder="Email, name, or display name..."> | |
| 11 | <button type="submit" class="btn btn-primary">Search</button> | |
| 12 | </form> | |
| 13 | </div> | |
| 14 | <style> | |
| 15 | tr.au-clickable { cursor: pointer; transition: background 0.12s; } | |
| 16 | tr.au-clickable:hover { background: rgba(255,255,255,0.04); } | |
| 17 | tr.au-clickable td a, tr.au-clickable td form { position: relative; z-index: 2; } | |
| 18 | </style> | |
| 19 | <div class="card"> | |
| 20 | [if:$has_users] | |
| 21 | <table class="table"> | |
| 22 | <thead><tr><th>Member</th><th>Email</th><th>Company</th><th>Role</th><th>Status</th><th>Last login</th><th></th></tr></thead> | |
| 23 | <tbody> | |
| 24 | [loop:@users] | |
| 25 | <tr class="au-clickable" data-href="/admin_user.cgi?u=$loop1.id"> | |
| 26 | <td><div style="display:flex;align-items:center;gap:10px"><div class="avatar avatar-sm" style="background:$loop1.avatar_color">$loop1.initials</div><div>$loop1.display_name [if:$loop1.is_super_admin]<span class="badge danger">SUPER</span>[/if]</div></div></td> | |
| 27 | <td>$loop1.email</td> | |
| 28 | <td>[if:$loop1.company_name]<span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:$loop1.company_color;margin-right:6px"></span><a href="/admin_users.cgi?company=$loop1.company_id" style="color:inherit">$loop1.company_name</a>[/if]</td> | |
| 29 | <td><span class="badge">$loop1.role</span></td> | |
| 30 | <td><span class="badge">$loop1.account_status</span></td> | |
| 31 | <td style="font-size:12px;color:var(--col-text-dim)"><span class="ts" data-ts="$loop1.last_login_epoch" data-fmt="datetime">$loop1.last_login_at</span></td> | |
| 32 | <td> | |
| 33 | [if:!$loop1.is_self] | |
| 34 | <form method="POST" action="/admin_action.cgi" style="display:inline" onclick="event.stopPropagation()"> | |
| 35 | <input type="hidden" name="act" value="impersonate"> | |
| 36 | <input type="hidden" name="target_user_id" value="$loop1.id"> | |
| 37 | <button type="submit" class="btn btn-warn btn-sm" style="background:var(--col-warn);color:#1a1303;border-color:var(--col-warn)">Impersonate</button> | |
| 38 | </form> | |
| 39 | [/if] | |
| 40 | </td> | |
| 41 | </tr> | |
| 42 | [/loop] | |
| 43 | </tbody> | |
| 44 | </table> | |
| 45 | <script> | |
| 46 | document.querySelectorAll('tr.au-clickable').forEach(function(tr){ | |
| 47 | tr.addEventListener('click', function(e){ | |
| 48 | if (e.target.closest('a,button,form,input')) return; | |
| 49 | window.location.href = tr.dataset.href; | |
| 50 | }); | |
| 51 | }); | |
| 52 | </script> | |
| 53 | [/if] | |
| 54 | [if:!$has_users]<div class="muted-empty"><h3>No users found</h3></div>[/if] | |
| 55 | </div> |