diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-18 02:16:23 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-18 02:16:23 +0200 |
| commit | d85c7998e5faa0da53514bae8cc2ccb9a9fe0cd3 (patch) | |
| tree | e29ebcdfa5361682f0dc73c928d8d35f0fc9533f /app | |
| parent | d41ee504caedbe858e24ab2a23c7a804454c64c8 (diff) | |
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).
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers/node_actions_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 | |||
| 114 | t("node_actions.destroy_draft", | 114 | t("node_actions.destroy_draft", |
| 115 | :actor => actor_ref(action), :subject => subject_ref(action)).html_safe | 115 | :actor => actor_ref(action), :subject => subject_ref(action)).html_safe |
| 116 | end | 116 | end |
| 117 | |||
| 118 | def summarize_trash action | ||
| 119 | t("node_actions.trash", :actor => actor_ref(action), :subject => subject_ref(action), | ||
| 120 | :from => h(action.metadata.dig("path", "from"))).html_safe | ||
| 121 | end | ||
| 122 | |||
| 123 | def summarize_restore_from_trash action | ||
| 124 | t("node_actions.restore_from_trash", :actor => actor_ref(action), :subject => subject_ref(action), | ||
| 125 | :to => h(action.metadata.dig("path", "to"))).html_safe | ||
| 126 | end | ||
| 127 | |||
| 128 | def summarize_destroy action | ||
| 129 | t("node_actions.destroy", :actor => actor_ref(action), :subject => subject_ref(action), | ||
| 130 | :path => h(action.metadata["path"])).html_safe | ||
| 131 | end | ||
| 117 | end | 132 | end |
