From 180b5feba092db1339f7bb3217e91f0b22239bc5 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 27 Jul 2026 02:53:21 +0200 Subject: Surface held locks in the dashboard's work-in-progress widget A lock with no draft or autosave behind it was invisible to everyone including its holder, until the next editor collided with it. work_in_progress now admits those nodes, and the widget names the holder rather than the last editor on any locked row. Also flips the ordering to stalest-first, so a backlog reads as a queue rather than a feed, and gives the heading a real total: the count came from the already-limited relation and could never exceed five. --- app/views/admin/index.html.erb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/views/admin/index.html.erb') diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index 25bdbdc6..984858e5 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb @@ -23,7 +23,7 @@
-

<%= t(".drafts_widget") %>

+

<%= t(".drafts_widget", :total => @drafts_total) %>

    <% @drafts.each do |node| %>
  • @@ -32,7 +32,13 @@ <%= link_to_path("#{node.unique_name} ↗", node.unique_name) %>
- <% if (editor = node_last_editor(node)) %><%= editor %>, <% end %><%= relative_time_phrase(node.updated_at) %> + <% if node.locked? %> + <%= icon("lock", library: "tabler", "aria-label": t(".held_by")) %> + <%= node.lock_owner.login %>, + <% elsif (editor = node_last_editor(node)) %> + <%= editor %>, + <% end %> + <%= relative_time_phrase(node.updated_at) %> <% end %> -- cgit v1.3