Diff -- /var/www/vhosts/3dshawn.com/ptmatrix.3dshawn.com/TEMPLATES/tf_admin_companies.html
Diff
/var/www/vhosts/3dshawn.com/ptmatrix.3dshawn.com/TEMPLATES/tf_admin_companies.html
added on local at 2026-07-11 18:33:04
Added
+55
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to b48f80e9e62e
to b48f80e9e62e
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 Companies</h1> | |
| 4 | <p class="subtitle">Every tenant on the platform. Click a row for full details.</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_companies.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"> | |
| 9 | [if:$has_companies] | |
| 10 | <style> | |
| 11 | tr.au-clickable { cursor: pointer; transition: background 0.12s; } | |
| 12 | tr.au-clickable:hover { background: rgba(255,255,255,0.04); } | |
| 13 | th.col-sorted, td.col-sorted { background: rgba(90,169,255,0.06); } | |
| 14 | </style> | |
| 15 | <table class="table"> | |
| 16 | <thead><tr> | |
| 17 | <th>Company</th> | |
| 18 | <th>Plan</th> | |
| 19 | <th[if:$sort_projects] class="col-sorted"[/if]><a href="/admin_companies.cgi?sort=users" style="color:inherit">Users</a></th> | |
| 20 | <th[if:$sort_projects] class="col-sorted"[/if]><a href="/admin_companies.cgi?sort=projects" style="color:inherit">Projects</a></th> | |
| 21 | <th[if:$sort_tasks] class="col-sorted"[/if]><a href="/admin_companies.cgi?sort=tasks" style="color:inherit">Tasks</a></th> | |
| 22 | <th[if:$sort_done] class="col-sorted"[/if]><a href="/admin_companies.cgi?sort=tasks_done" style="color:inherit">Done</a></th> | |
| 23 | <th>Trial ends</th> | |
| 24 | <th>Status</th> | |
| 25 | <th>Created</th> | |
| 26 | <th></th> | |
| 27 | </tr></thead> | |
| 28 | <tbody> | |
| 29 | [loop:@companies] | |
| 30 | <tr class="au-clickable" data-href="/admin_company.cgi?id=$loop1.id"> | |
| 31 | <td><div style="display:flex;align-items:center;gap:8px"><span style="display:inline-block;width:10px;height:10px;border-radius:3px;background:$loop1.brand_color"></span>$loop1.name</div></td> | |
| 32 | <td><span class="badge">$loop1.plan_tier</span></td> | |
| 33 | <td>$loop1.users_n</td> | |
| 34 | <td>$loop1.projects_n</td> | |
| 35 | <td>$loop1.tasks_n</td> | |
| 36 | <td>$loop1.tasks_done_n</td> | |
| 37 | <td><span class="ts" data-ts="$loop1.trial_ends_epoch" data-fmt="datetime">$loop1.trial_ends_at</span></td> | |
| 38 | <td>[if:$loop1.status]<span class="badge">$loop1.status</span>[/if]</td> | |
| 39 | <td style="font-size:12px;color:var(--col-text-dim)"><span class="ts" data-ts="$loop1.created_epoch" data-fmt="datetime">$loop1.created_at</span></td> | |
| 40 | <td style="display:flex;gap:6px" onclick="event.stopPropagation()"><a href="/admin_users.cgi?company=$loop1.id" class="btn btn-ghost btn-sm">View users</a><a href="/admin_company.cgi?id=$loop1.id" class="btn btn-ghost btn-sm">Manage</a></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_companies]<div class="muted-empty"><h3>No companies match this filter</h3>[if:$has_filter]<p><a href="/admin_companies.cgi">Show all companies</a></p>[/if]</div>[/if] | |
| 55 | </div> |