summaryrefslogtreecommitdiffstats
path: root/views/admin
diff options
context:
space:
mode:
authorKen D'Ambrosio <ken@jots.org>2026-06-08 22:39:58 +0000
committerKen D'Ambrosio <ken@jots.org>2026-06-08 22:39:58 +0000
commitcf1385bbd6d88a8db9f615512564e150c85a0b5f (patch)
tree371bc4b8aea8dd6f4fa2771c12a68ce7fca14eae /views/admin
parent7f6325fe213ed46ff5479ffd34b0e212426d48f2 (diff)
Add face and cluster deletion to people admin
On the cluster detail page: "Remove face" option in each face's move dropdown removes it from the cluster entirely; "Delete cluster" button (red, with confirmation) removes the whole cluster from people.json. Moving the last face out of a cluster also auto-deletes it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'views/admin')
-rw-r--r--views/admin/person_detail.erb9
1 files changed, 9 insertions, 0 deletions
diff --git a/views/admin/person_detail.erb b/views/admin/person_detail.erb
index 448aaff..8a2f8fe 100644
--- a/views/admin/person_detail.erb
+++ b/views/admin/person_detail.erb
@@ -38,6 +38,14 @@
</section>
<% end %>
+ <%# ── Delete cluster ──────────────────────────────────────────────────── %>
+ <section style="margin-bottom:28px">
+ <form method="post" action="/admin/people/<%= ERB::Util.url_encode(@uuid) %>/delete"
+ onsubmit="return confirm('Delete this entire cluster (<%= @count %> photo<%= @count == 1 ? '' : 's' %>)? This cannot be undone.')">
+ <button type="submit" class="btn btn-danger">Delete cluster</button>
+ </form>
+ </section>
+
<%# ── Face grid ────────────────────────────────────────────────────────── %>
<p class="update-hint">
Hover a face to see the full photo.
@@ -69,6 +77,7 @@
<option value="<%= ERB::Util.html_escape(p[:uuid]) %>"><%= ERB::Util.html_escape(p[:name]) %></option>
<% end %>
<option value="new">New person</option>
+ <option value="remove">Remove face</option>
</select>
</form>
<% end %>