summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-08 22:52:00 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-08 22:52:00 +0200
commit168ff3f8b6037bc3c2b5bce74adac37e48366dac (patch)
tree3d33fa85125266f3ec827528f73da4704b948f45 /app/controllers
parent9427dc462e68eb4b902cd5b2ace5607b036504ef (diff)
Add the Status section to nodes#show and rebuild nodes#edit's action bar
Retires content_for :subnavigation on nodes#show entirely -- Preview was fully redundant with Links' own preview URLs in every state, and Edit is now a permanent, always-rendered action inside the new Status section rather than a link floating at the top, consistent with the "action lives next to the info" pattern People already established for Unlock. Status surfaces head/draft/autosave plainly and gates Edit/Publish/Destroy/Discard on lock ownership specifically, not mere lock presence -- @node.locked? alone would have blocked the lock owner's own session, caught by the click-test and fixed here rather than shipped. nodes#edit's action bar is rebuilt to sit outside form_for (both button_to calls render their own nested form, invalid HTML the browser was silently stripping) with Save wired back in via form="..." rather than needing to live inside the form tag at all. Also brings the locked-and-ready-to-edit flash message, and the visual polish from this session's click-test: consistent button heights across the bordered and pill-shaped variants sharing a row, spacing between Status's data and its actions, and error_messages styling reusing the destructive-red vocabulary already established elsewhere.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/nodes_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb
index d8586e2..72d4a3e 100644
--- a/app/controllers/nodes_controller.rb
+++ b/app/controllers/nodes_controller.rb
@@ -68,6 +68,8 @@ class NodesController < ApplicationController
68 @node.lock_for_editing!( current_user ) 68 @node.lock_for_editing!( current_user )
69 @page = @node.autosave || @node.draft || @node.head 69 @page = @node.autosave || @node.draft || @node.head
70 70
71 flash.now[:notice] = "Node locked and ready to edit" unless @node.autosave
72
71 if @node.autosave 73 if @node.autosave
72 flash.now[:notice] = 74 flash.now[:notice] =
73 "This page has unsaved changes from a previous session, shown below. " \ 75 "This page has unsaved changes from a previous session, shown below. " \