diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-18 02:15:29 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-18 02:15:29 +0200 |
| commit | d41ee504caedbe858e24ab2a23c7a804454c64c8 (patch) | |
| tree | eb3ec7c8f44d15fea40292d0a9e7358e41640edc /app/models/node_action.rb | |
| parent | 5dced8b4b624aabf4215ba21b13957080345c326 (diff) | |
Add Trash affordances: cockpit, listing, dashboard entry
nodes#show gains a Trash section on trashed nodes: provenance from
the trash entry, a restore form whose parent picker pre-fills the
old parent while it still lives, and permanent deletion. A
Move-to-Trash button joins the status actions on living nodes.
nodes#trashed lists trashed subtree roots with weight, provenance,
and deletion; the dashboard housekeeping row links to it, and
trash/destroy redirect there.
Deletion from Trash now removes the whole subtree, deepest first,
each node through a real destroy! so every per-node cascade runs --
amending the never-recursive rule for this one sanctioned path
(both confirms state the count; the root entry carries
destroyed_descendants). Bare Node#destroy still refuses children.
Diffstat (limited to 'app/models/node_action.rb')
| -rw-r--r-- | app/models/node_action.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/node_action.rb b/app/models/node_action.rb index 6e09b5b..13bd5ba 100644 --- a/app/models/node_action.rb +++ b/app/models/node_action.rb | |||
| @@ -65,6 +65,8 @@ class NodeAction < ApplicationRecord | |||
| 65 | # "destroy" (only from inside the Trash, never with children; the | 65 | # "destroy" (only from inside the Trash, never with children; the |
| 66 | # entry is written in the same transaction before the row dies): | 66 | # entry is written in the same transaction before the row dies): |
| 67 | # "path" -- final path, flat string (create-symmetric) | 67 | # "path" -- final path, flat string (create-symmetric) |
| 68 | # "destroyed_descendants" -- integer, only when positive; one entry | ||
| 69 | # at the root, per the subtree rule. | ||
| 68 | # | 70 | # |
| 69 | # Reserved: "demote" (via "trash" | "depublish") for an explicit | 71 | # Reserved: "demote" (via "trash" | "depublish") for an explicit |
| 70 | # depublish workflow, if ever built. | 72 | # depublish workflow, if ever built. |
