gabriel / musehub public
collaborator_rows.html html
45 lines 1.6 KB
Raw
sha256:25d96102cb2d69a038356dff26f4633156da2f1faf98fe0d0e4438ff3f367f12 refactor: rename 0054/0055 migrations to standard convention Sonnet 4.6 minor ⚠ breaking 106 days ago
1 {#
2 collaborator_rows — bare collaborator list fragment for HTMX partial updates.
3
4 Rendered for both the initial {% include %} inside collaborators_settings.html
5 and for subsequent HTMX requests (HX-Request: true) that refresh the list
6 after invite/remove actions.
7
8 Context
9 -------
10 collaborators : list[MusehubCollaborator]
11 ORM rows. Keys used: identity_handle, permission, invited_by, invited_at, repo_id.
12 repo_id : str
13 Used to build the DELETE API URL for each row's remove button.
14 #}
15 {% if collaborators %}
16 {% for c in collaborators %}
17 <div class="collab-row" id="collab-{{ c.identity_handle }}">
18 <div class="collab-identity">
19 <span class="collab-avatar">{{ (c.identity_handle or '?')[0] | upper }}</span>
20 <div class="collab-info">
21 <span class="collab-uid">{{ c.identity_handle }}</span>
22 {% if c.invited_by_handle %}
23 <span class="collab-meta">Invited by {{ c.invited_by_handle }}</span>
24 {% endif %}
25 </div>
26 </div>
27 <div class="collab-actions">
28 <span class="perm-badge badge-perm-{{ c.permission }}">
29 {{ c.permission }}{% if c.permission == 'owner' %} 👑{% endif %}
30 </span>
31 {% if c.permission != 'owner' %}
32 <form hx-delete="/api/repos/{{ repo_id }}/collaborators/{{ c.identity_handle }}"
33 hx-target="#collaborator-rows"
34 hx-swap="innerHTML"
35 hx-confirm="Remove {{ c.identity_handle }} from this repository?"
36 style="display:inline">
37 <button type="submit" class="btn btn-danger btn-sm">Remove</button>
38 </form>
39 {% endif %}
40 </div>
41 </div>
42 {% endfor %}
43 {% else %}
44 <p class="collab-empty">No collaborators yet. Invite someone above.</p>
45 {% endif %}
File History 2 commits
sha256:25d96102cb2d69a038356dff26f4633156da2f1faf98fe0d0e4438ff3f367f12 refactor: rename 0054/0055 migrations to standard convention Sonnet 4.6 minor 106 days ago
sha256:b99f2455dc346966d040133f5203297e6e3ef5803a93728a2c30568d0a0f7583 rename: delta_add → delta_upsert across wire format, models… Sonnet 4.6 patch 107 days ago