From d85c7998e5faa0da53514bae8cc2ccb9a9fe0cd3 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 18 Jul 2026 02:16:23 +0200 Subject: Teach the action log reader the Trash vocabulary Sentences for trash (with the pre-trash path), restore_from_trash (with the destination), and destroy (with the final path, read from its flat create-symmetric key). --- app/helpers/node_actions_helper.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'app') diff --git a/app/helpers/node_actions_helper.rb b/app/helpers/node_actions_helper.rb index 996f98d..c829dff 100644 --- a/app/helpers/node_actions_helper.rb +++ b/app/helpers/node_actions_helper.rb @@ -114,4 +114,19 @@ module NodeActionsHelper t("node_actions.destroy_draft", :actor => actor_ref(action), :subject => subject_ref(action)).html_safe end + + def summarize_trash action + t("node_actions.trash", :actor => actor_ref(action), :subject => subject_ref(action), + :from => h(action.metadata.dig("path", "from"))).html_safe + end + + def summarize_restore_from_trash action + t("node_actions.restore_from_trash", :actor => actor_ref(action), :subject => subject_ref(action), + :to => h(action.metadata.dig("path", "to"))).html_safe + end + + def summarize_destroy action + t("node_actions.destroy", :actor => actor_ref(action), :subject => subject_ref(action), + :path => h(action.metadata["path"])).html_safe + end end -- cgit v1.3