Diff -- /var/www/vhosts/webstls.com/httpdocs/TEMPLATES/webstls_admin_teams.html
Diff
/var/www/vhosts/webstls.com/httpdocs/TEMPLATES/webstls_admin_teams.html
added on WebSTLs (webstls.com) at 2026-07-01 22:26:56
Added
+88
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to 3168bf886851
to 3168bf886851
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><h1>Teams</h1><p class="subtitle">Sub-divide your platform staff so calendars and reports can scope to a team.</p></div> | |
| 3 | </div> | |
| 4 | ||
| 5 | <div style="display:grid;grid-template-columns: 360px 1fr;gap:16px"> | |
| 6 | <div class="card" style="padding:18px"> | |
| 7 | <h3 style="margin:0 0 12px;font-size:14px">Create team</h3> | |
| 8 | <form method="POST" action="/admin_teams.cgi"> | |
| 9 | <input type="hidden" name="act" value="create"> | |
| 10 | <div class="field" style="margin-bottom:10px"> | |
| 11 | <label style="font-size:11px;color:var(--col-text-dim)">Name</label> | |
| 12 | <input class="input" name="name" required style="width:100%;padding:8px 10px;border-radius:6px;border:1px solid var(--col-border);background:var(--col-surface-2);color:var(--col-text)"> | |
| 13 | </div> | |
| 14 | <div class="field" style="margin-bottom:10px"> | |
| 15 | <label style="font-size:11px;color:var(--col-text-dim)">Color</label> | |
| 16 | <input class="input" type="color" name="color" value="#5aa9ff" style="width:60px;height:32px;border-radius:6px;border:1px solid var(--col-border);background:var(--col-surface-2)"> | |
| 17 | </div> | |
| 18 | <div class="field" style="margin-bottom:10px"> | |
| 19 | <label style="font-size:11px;color:var(--col-text-dim)">Parent team (optional)</label> | |
| 20 | <select class="input" name="parent_team_id" style="width:100%;padding:8px 10px;border-radius:6px;border:1px solid var(--col-border);background:var(--col-surface-2);color:var(--col-text)"> | |
| 21 | <option value="">— none —</option> | |
| 22 | [loop:@teams] | |
| 23 | <option value="$loop1.id">$loop1.name</option> | |
| 24 | [/loop] | |
| 25 | </select> | |
| 26 | </div> | |
| 27 | <button type="submit" class="btn btn-primary" style="width:100%">Create team</button> | |
| 28 | </form> | |
| 29 | </div> | |
| 30 | ||
| 31 | <div class="card" style="padding:0"> | |
| 32 | <div style="padding:14px 18px;border-bottom:1px solid var(--col-border)"><h3 style="margin:0;font-size:14px">Existing teams</h3></div> | |
| 33 | [if:$has_teams] | |
| 34 | <table class="table" style="margin:0"> | |
| 35 | <thead><tr><th>Team</th><th>Parent</th><th>Members</th><th></th></tr></thead> | |
| 36 | <tbody> | |
| 37 | [loop:@teams] | |
| 38 | <tr> | |
| 39 | <td><span style="display:inline-block;width:10px;height:10px;border-radius:3px;background:$loop1.color;margin-right:6px"></span>$loop1.name</td> | |
| 40 | <td style="color:var(--col-text-dim)">[if:$loop1.parent_name]$loop1.parent_name[/if][if:!$loop1.parent_name]—[/if]</td> | |
| 41 | <td>$loop1.members_n</td> | |
| 42 | <td> | |
| 43 | <form method="POST" action="/admin_teams.cgi" style="display:inline" onsubmit="return confirm('Delete team and unassign its members?')"> | |
| 44 | <input type="hidden" name="act" value="delete"> | |
| 45 | <input type="hidden" name="team_id" value="$loop1.id"> | |
| 46 | <button type="submit" class="btn btn-ghost btn-sm" style="color:#f87171">Delete</button> | |
| 47 | </form> | |
| 48 | </td> | |
| 49 | </tr> | |
| 50 | [/loop] | |
| 51 | </tbody> | |
| 52 | </table> | |
| 53 | [/if] | |
| 54 | [if:!$has_teams]<div style="padding:20px;color:var(--col-text-dim);font-size:13px">No teams yet. Create one to the left.</div>[/if] | |
| 55 | </div> | |
| 56 | </div> | |
| 57 | ||
| 58 | <div class="card" style="margin-top:16px;padding:0"> | |
| 59 | <div style="padding:14px 18px;border-bottom:1px solid var(--col-border)"><h3 style="margin:0;font-size:14px">Assign staff to teams</h3></div> | |
| 60 | [if:$has_staff] | |
| 61 | <table class="table" style="margin:0"> | |
| 62 | <thead><tr><th>Staff member</th><th>Email</th><th>Current team</th><th>Assign</th></tr></thead> | |
| 63 | <tbody> | |
| 64 | [loop:@staff] | |
| 65 | <tr> | |
| 66 | <td>$loop1.display_name</td> | |
| 67 | <td style="color:var(--col-text-dim)">$loop1.email</td> | |
| 68 | <td>[if:$loop1.team_name]<span style="display:inline-block;width:10px;height:10px;border-radius:3px;background:$loop1.team_color;margin-right:6px"></span>$loop1.team_name[/if][if:!$loop1.team_name]<span style="color:var(--col-text-dim)">— unassigned —</span>[/if]</td> | |
| 69 | <td> | |
| 70 | <form method="POST" action="/admin_teams.cgi" style="display:flex;gap:6px"> | |
| 71 | <input type="hidden" name="act" value="assign"> | |
| 72 | <input type="hidden" name="user_id" value="$loop1.id"> | |
| 73 | <select name="team_id" style="padding:5px 8px;border-radius:5px;border:1px solid var(--col-border);background:var(--col-surface-2);color:var(--col-text);font-size:12px"> | |
| 74 | <option value="">— none —</option> | |
| 75 | [loop:@teams] | |
| 76 | <option value="$loop2.id">$loop2.name</option> | |
| 77 | [/loop] | |
| 78 | </select> | |
| 79 | <button type="submit" class="btn btn-ghost btn-sm">Set</button> | |
| 80 | </form> | |
| 81 | </td> | |
| 82 | </tr> | |
| 83 | [/loop] | |
| 84 | </tbody> | |
| 85 | </table> | |
| 86 | [/if] | |
| 87 | [if:!$has_staff]<div style="padding:20px;color:var(--col-text-dim);font-size:13px">No staff (is_admin=1 users) yet.</div>[/if] | |
| 88 | </div> |