summaryrefslogtreecommitdiff
path: root/app/views/admin
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-27 02:53:21 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-27 02:53:21 +0200
commit180b5feba092db1339f7bb3217e91f0b22239bc5 (patch)
treeed2912eb568639d027e2d54bc4f28c7a9406f7e0 /app/views/admin
parent102c33264fd1463cd88aa8245413e7b331dd9632 (diff)
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.
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/index.html.erb10
1 files changed, 8 insertions, 2 deletions
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 @@
23 23
24<div id="dashboard_widgets"> 24<div id="dashboard_widgets">
25 <div class="dashboard_widget"> 25 <div class="dashboard_widget">
26 <h3><%= t(".drafts_widget") %></h3> 26 <h3><%= t(".drafts_widget", :total => @drafts_total) %></h3>
27 <ul> 27 <ul>
28 <% @drafts.each do |node| %> 28 <% @drafts.each do |node| %>
29 <li> 29 <li>
@@ -32,7 +32,13 @@
32 <span class="field_hint"><%= link_to_path("#{node.unique_name} ↗", node.unique_name) %></span> 32 <span class="field_hint"><%= link_to_path("#{node.unique_name} ↗", node.unique_name) %></span>
33 </div> 33 </div>
34 <span class="dashboard_widget_meta"> 34 <span class="dashboard_widget_meta">
35 <% if (editor = node_last_editor(node)) %><%= editor %>, <% end %><%= relative_time_phrase(node.updated_at) %> 35 <% if node.locked? %>
36 <%= icon("lock", library: "tabler", "aria-label": t(".held_by")) %>
37 <%= node.lock_owner.login %>,
38 <% elsif (editor = node_last_editor(node)) %>
39 <%= editor %>,
40 <% end %>
41 <%= relative_time_phrase(node.updated_at) %>
36 </span> 42 </span>
37 </li> 43 </li>
38 <% end %> 44 <% end %>